Forum Stats

  • 3,783,617 Users
  • 2,254,809 Discussions


Finding system folders

843807 Member Posts: 46,582
edited Feb 21, 2003 3:09PM in Java Desktop Applications
I'm writing a java program that should find (when installed) the system folders 'Temporary Internet Files' and 'Favorites'. -Is there a way to do it so it will work on any windows system?


  • 843807
    843807 Member Posts: 46,582
    I had this problem. I found no java solution.

    What I did was ran a batch file to launch the java application. This batch file also dumped some of the system variables into a txt file which the java program then read in and used.

    For example

    echo %windir% > compInfo.txt
    echo %userprofile% >> compInfo.txt
    echo %username% >> compInfo.txt

    Then you should be able to work out the path to the favourites etc...

  • 843807
    843807 Member Posts: 46,582
    Download SWIN 1.0 package from

    and use this package, you can access Windows system environment variables such as "PATH", "TEMP", or "TMP".

    [email protected]
This discussion has been closed.