Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Get directory for appliation data storage on any platform

  1. #1
    Junior Member
    Join Date
    Nov 2017
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Get directory for appliation data storage on any platform

    I need a directory to store application data.
    of course this will be different on Windows, Mac, or Linux.

    i think these are the best directorys for this

    for windows i need

    [current user directory]/AppData/Local

    on OS X i need

    [current user directory]/Library/Application Support

    detect the platform!!

    System.getProperty("os.name")

    --- Update ---

    and you need the username too
    String username = System.getProperty("user.name");

  2. #2
    Member
    Join Date
    Dec 2013
    Location
    Honolulu
    Posts
    83
    Thanks
    1
    Thanked 4 Times in 2 Posts

    Default Re: Get directory for appliation data storage on any platform

    The class files saved is saved to make it easy for anyone to store their files in a proper organized class files directory. We would start at the root level. Windows, http://www.mycompany.com/myfolder/project/file1.htlml, file1.html is at the root level. As an example.

Similar Threads

  1. Problem with 3D game data storage
    By fiendfan1 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 22nd, 2013, 06:59 PM
  2. Data Storage Security in Cloud Computing
    By Amakuru in forum Member Introductions
    Replies: 1
    Last Post: October 23rd, 2012, 02:34 AM
  3. Data storage question - which type would be best?
    By mmazur in forum Java Theory & Questions
    Replies: 5
    Last Post: August 25th, 2012, 09:57 AM
  4. Problems with File Reader (Strings and 2D Array Storage)
    By K0209 in forum File I/O & Other I/O Streams
    Replies: 44
    Last Post: January 12th, 2010, 10:48 AM
  5. Virutal File Directory from Given dAta
    By hugsheals in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: July 28th, 2009, 03:39 AM