Results 1 to 5 of 5
  1. #1
    ocean is offline Senior Member
    Join Date
    Sep 2009
    Location
    Sweden/Borås
    Posts
    107
    Rep Power
    0

    Default How to. Files and Directory

    Evening.

    As I now begin to be finished with my program, I have a few questions.

    1 How can my program know what OS it is installing on?

    2 Do i use some if statement when i create files that the program use.
    ex. if windows ( file c:// ) else if Linux (file/home) ?

    Think thats all i have left for now. Any tip would be appreciated.

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,526
    Blog Entries
    7
    Rep Power
    20

    Default

    Read the API documentation for the System.getProperties() object.

    kind regards,

    Jos

  3. #3
    ocean is offline Senior Member
    Join Date
    Sep 2009
    Location
    Sweden/Borås
    Posts
    107
    Rep Power
    0

    Thumbs up Solved

    Thank you. Did not know what I would look for.

  4. #4
    Join Date
    Dec 2009
    Posts
    9
    Rep Power
    0

    Default

    Quote Originally Posted by ocean View Post
    Evening.

    As I now begin to be finished with my program, I have a few questions.

    1 How can my program know what OS it is installing on?

    2 Do i use some if statement when i create files that the program use.
    ex. if windows ( file c:// ) else if Linux (file/home) ?

    Think thats all i have left for now. Any tip would be appreciated.
    hi,,
    the first Q i didn't understand it could u exeplane it more?
    the 2nd one could you write the whole section ?

  5. #5
    ocean is offline Senior Member
    Join Date
    Sep 2009
    Location
    Sweden/Borås
    Posts
    107
    Rep Power
    0

    Default

    Just needed to be pointed in the right direction. JosAH solved my question. Thx for the replay tho. :)

Similar Threads

  1. how to find files in given directory
    By cecily in forum New To Java
    Replies: 7
    Last Post: 07-04-2014, 12:03 PM
  2. Populating a gui list box with the files in a directory
    By josejvelezcolon in forum New To Java
    Replies: 1
    Last Post: 08-10-2009, 04:50 PM
  3. (Recursively?) Getting Files in a Directory
    By Singing Boyo in forum New To Java
    Replies: 2
    Last Post: 05-21-2009, 08:37 AM
  4. load all files in a directory
    By moomoo in forum New To Java
    Replies: 1
    Last Post: 04-21-2008, 10:18 AM
  5. How can I get list of files in a directory
    By karma in forum New To Java
    Replies: 2
    Last Post: 12-14-2007, 11:20 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
  •