Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-09-2007, 10:42 PM
Member
 
Join Date: Jul 2007
Posts: 23
marco is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-09-2007, 11:18 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
I think you can put the files in that path into a jar and load from the jar in the same way.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-09-2007, 11:22 PM
Member
 
Join Date: Jul 2007
Posts: 23
marco is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-25-2007, 08:28 AM
Member
 
Join Date: Nov 2007
Posts: 1
jazzua is on a distinguished road
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!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ant Paths(II) JavaForums Java Blogs 0 03-02-2008 01:45 AM
Ant Paths(I) JavaForums Java Blogs 0 03-02-2008 01:45 AM
Ant Paths(III) JavaForums Java Blogs 0 02-18-2008 12:52 PM
JSP – getting list of directories Java Tip Java Tips 0 01-31-2008 01:51 PM
Creating and checking directories with java code tim New To Java 8 01-07-2008 06:41 AM


All times are GMT +3. The time now is 10:58 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org