Results 1 to 3 of 3
  1. #1
    FrankyDee is offline Member
    Join Date
    Jun 2007
    Posts
    5
    Rep Power
    0

    Question finding Operating System specific data

    Hi there,

    I'm a newbie to Java so please, bare with me.

    I have to write an application that is going to store user preferences.
    To store them, I need to find out the user's home directory on any platform this app can run on (Windows, Unix, Linux)

    For example, on Windows, I'd need to know the user's My Documents folder

    Can anybody help ?
    Franck

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Check getProperties() method in this class. "user.home" system property is what you can obtain from Java. This will work for all OSes supported.

  3. #3
    FrankyDee is offline Member
    Join Date
    Jun 2007
    Posts
    5
    Rep Power
    0

Similar Threads

  1. Main method throwing specific Exception
    By bugger in forum New To Java
    Replies: 5
    Last Post: 05-13-2009, 03:34 PM
  2. Replies: 1
    Last Post: 04-24-2008, 07:35 PM
  3. Select specific cell
    By Echilon in forum New To Java
    Replies: 1
    Last Post: 01-01-2008, 08:47 AM
  4. Rejecting connections from a specific IP
    By javaplus in forum Networking
    Replies: 2
    Last Post: 12-21-2007, 03:28 PM
  5. Tracking Operating System
    By Mansi in forum Networking
    Replies: 2
    Last Post: 07-23-2007, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •