I open a path through the terminal.
I launch a jar file using "java -jar".
Everything works.
I open a path through nautilus.
I launch a jar file with double-click.
The file's supposed to open with some
"Sun Java 6 Runtime" (I suppose it's /usr/bin/java...?)
The program is launched, but the current path is
my home folder ("/home/my-user/.")!
I mean, this code: JOptionPane.showMessageDialog(null, new File(".").getAbsolutePath());
will print the current directory when my program
is launched with "java -jar". But it will always print
my home folder (whatever the current folder is)!
Right-click -> Open with -> Open with another application... ->
-> Use a custom command -> (typing) "java -jar"
won't help. It's as if nautilus switched the current
directory specially for launching the JVM,
though I'm not sure it will only do that for
"/usr/bin/java" (but since that's the only
language I know that is launched through a VM...)
And, yes, I know, I'll take a good look at Python
as soon as I get some free time ;)
Binary package hint: nautilus
I open a path through the terminal.
I launch a jar file using "java -jar".
Everything works.
I open a path through nautilus. my-user/ .")!
I launch a jar file with double-click.
The file's supposed to open with some
"Sun Java 6 Runtime" (I suppose it's /usr/bin/java...?)
The program is launched, but the current path is
my home folder ("/home/
I mean, this code:
JOptionPane. showMessageDial og(null,
new File(". ").getAbsoluteP ath());
will print the current directory when my program
is launched with "java -jar". But it will always print
my home folder (whatever the current folder is)!
Right-click -> Open with -> Open with another application... ->
-> Use a custom command -> (typing) "java -jar"
won't help. It's as if nautilus switched the current
directory specially for launching the JVM,
though I'm not sure it will only do that for
"/usr/bin/java" (but since that's the only
language I know that is launched through a VM...)
And, yes, I know, I'll take a good look at Python
as soon as I get some free time ;)
------- ------- ------- ------- ------
Ubuntu version: Hardy
Nautilus package policy: 1:2.22.2-0ubuntu6