Public bug reported:
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.
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 show the current directory when my program
is launched with "java -jar". But when launched by nautilus
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
** Affects: nautilus (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
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.
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)!
+ is launched with "java -jar". But when launched by nautilus
+ 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
** Description changed:
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.
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
+ will show the current directory when my program
is launched with "java -jar". But when launched by nautilus
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
--
jvm receives wrong path
https://bugs.launchpad.net/bugs/234777
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs