JFileChooser start in .jar directory
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:
where fc is the file chooser...
fc.setCurrentDirectory(new File(Juego.class.getProtectionDomain().getCodeSour ce().getLocation().getPath()));
Any idea??? I googled it but I couldn't find anything.