Results 1 to 2 of 2
  1. #1
    NeuroFuzzy is offline Member
    Join Date
    Sep 2010
    Posts
    10
    Rep Power
    0

    Default Find the "application data" folder?

    Well... What I really need is a primer on java file handling. What I want to do is find the .minecraft directory on a computer using java. Normally this would be in (rootdrive):\Documents and Settings\<user>\Application Data\.minecraft

    So... Obviously some program got that folder there, so I can... but I don't know how! Any help? And, since this is a java program, and therefore supposed to be cross-platform - how can I find that .minecraft folder on other OSes?

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    10

    Default

    Probably using the system property for the current user's home directory, e.g.
    Java Code:
    File mineCraftFolder = new File(System.getProperty("user.home"), ".minecraft");

Similar Threads

  1. Replies: 3
    Last Post: 08-25-2010, 10:21 AM
  2. Using Throwable to store data in buffers and "throwing" data
    By BruteforceFtw in forum New To Java
    Replies: 7
    Last Post: 06-08-2010, 02:02 PM
  3. Replies: 1
    Last Post: 06-30-2009, 02:32 PM
  4. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  5. "Cannont find symbol Constructor" error
    By Welsh in forum New To Java
    Replies: 7
    Last Post: 01-25-2008, 12:12 AM

Posting Permissions

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