JFileChooser start in .jar directory
Hi!
I'm using a JFileChooser to save a file, but I want the JFileChooser to start in the same directory where the application jar is...
For example, if the jar of my application name is "Test.jar" and is saved in "c:\app\test.jar", I want the JFileChooser to start in "c:\app\".
I've tried to do this but It didn't work:
Quote:
fc.setCurrentDirectory(new File(Juego.class.getProtectionDomain().getCodeSour ce().getLocation().getPath()));
where fc is the file chooser...
Any idea??? I googled it but I couldn't find anything.
thanks!