Menu

How to use

Richard

WinFolderPath is a Java library used to find a CSIDL identified path on a Windows Machine such as My Pictures, My Music and more. WinFolderPath uses a Native dll interface to obtain the path. WinFolderPath is both 32 bit JVM and 64 bit JVM compatible.

How to use: Example

 import com.openviewdesign.winutility.WinFolder;

 public class Example
 {
    public static void main(String[] args)
    {
       try
       {
          WinFolder wf = new WinFolder();
          String myDocuments = wf.getFolderLocation(WinFolder.CSIDL_MYDOCUMENTS);
          String myMusic = wf.getFolderLocation(WinFolder.CSIDL_MYMUSIC);
          String myPictures = wf.getFolderLocation(WinFolder.CSIDL_MYPICTURES);
          String myVideo = wf.getFolderLocation(WinFolder.CSIDL_MYVIDEO);

          System.out.println("Path to My Documents: " + myDocuments);
          System.out.println("Path to My Music: " + myMusic);
          System.out.println("Path to My Pictures: " + myPictures);
          System.out.println("Path to My Video: " + myVideo);
       }
       catch(Exception e)
       {
          System.out.println(e);
       }
    }
 }

WinFolderPathEmbeded.zip - Self Contained JAR for winfolderpath (writes dll to temp directory, dll is in jar)

WinFolderPath.zip - Contains JAR Library, 32 Bit DLL, 64Bit DLL, javadoc, Example and source code


MongoDB Logo MongoDB