Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Can the JFileChooser's starting directory be set to the project or workspace folder?
Can the JFileChooser's starting directory be set to the project or workspace folder? [message #521671] Thu, 18 March 2010 09:15
Eclipse UserFriend
I have my JFileChooser working correctly on my machine, but I am worried about the hard-coded part of my path. On other machines it could break... Is there a way to make it start at the project folder (wvt2) or the workspace folder?

JFileChooser chooser = new JFileChooser(File.separator + System.getProperty("user.home") + 
				File.separator + "Desktop" + File.separator + "workspace" + File.separator + "wvt2" + 
				File.separator + "src" + File.separator + "main" + File.separator);
Previous Topic:jni library help?
Next Topic:What is the point of running a j2ee server adapter inside eclipse as opposed to
Goto Forum:
  


Current Time: Mon Mar 24 10:23:17 EDT 2025

Powered by FUDForum. Page generated in 0.03381 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top