title: when getting drive information using java
body: <p>i tried the following program  </p>
  
  <pre><code>import java.io.*;
  class dr
  {     
    public static void main(String args[])
      {
        try{
             File[] roots = File.listRoots();     
             for (int index = 0; index &lt; roots.length; index++)    
             { //Print out each drive/partition          
              System.out.println(roots[index].toString());    
             }
           }
        catch(Exception e)
          { 
           System.out.println("error   " +e);
          }
      }
  }
  </code></pre>
  
  <p>but in my system floppy drive is not connected 
  and i am getting a message like the following</p>
  
  <p>" The drive is not ready for use;its door may be open,Please check drive A: and make sure that disk is inserted and that the drive door is closed"
  then three options are shown cancel,try again,continue
  when i try continue,it works
  but how i could avoid that msg </p>