title: How to close a text file using java
body: <p>If i have opened a text file using Desktop API in java and i want to close it again only using the code?
  I have opened it like this</p>
  
  <pre><code>Desktop d=Desktop.getDesktop();
      try {
          d.open(new File("C:/Users/home/Desktop/123.txt"));
  
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      Thread.sleep(2000);
  </code></pre>
  
  <p>Now i want to close it?how will i do it,what code do i have to Write,Since there is no method in the Desktop API of the java</p>