Skip to content

How to open a folder in Java swing project?

String FolderName="C:/name";//Write your complete path here
try {
       Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + FolderName);
    } catch (IOException ex) {
             Logger.getLogger(ClassName.class.getName()).log(Level.SEVERE, null, ex);
    }
See also  CSS code snippet - How to hide the bullet list ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.