Results 1 to 4 of 4
  1. #1
    marco is offline Member
    Join Date
    Jul 2007
    Posts
    23
    Rep Power
    0

    Default getting paths and directories

    hey i am working on a massive RPG i want to put online, and right now i have to run it on the applet (on my desktop) with the entire filepath, and i have a variable there

    private final String FILEPATH = "C:\\Documents and Settings\\Desktop\\RPG\\";

    now if it goes online i would have to change the filepath to "www.w/e the site will be.com\\" and recompile which would be a total pain!!!

    is there anyway that i could make the FILEPATH variable just get the current directory it is in?

  2. #2
    levent Guest

    Default

    I think you can put the files in that path into a jar and load from the jar in the same way.

  3. #3
    marco is offline Member
    Join Date
    Jul 2007
    Posts
    23
    Rep Power
    0

    Default

    nah coz if i want to update the graphics and the pics and the scripts being imported i dont wanna go thru opening the jar lol

  4. #4
    jazzua is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Default

    I'm also having this problem but in relation to a JFileChooser. I've searched the api and the java tutorials but can't figure out how to get the opendialog box to open with the cwd displayed. as in the directory where my class file that i'm instantiating the JFileChooser from lives. help please!

Similar Threads

  1. JSP – getting list of directories
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-31-2008, 12:51 PM
  2. Replies: 8
    Last Post: 01-07-2008, 05:41 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
  •