You are not logged in.
In the Java Package Guidelines there are shell scripts that run the java jar or class file. Shouldn't the $@ be added as a parameter, to feed parameters to the java application?
For instance, I wrote the following for Logisim:
#!/bin/sh
"$JAVA_HOME/bin/java" -jar '/usr/share/java/logisim/logisim.jar' $@
Last edited by Marcel- (2014-04-11 10:32:43)
Offline
It should be quoted to prevent word expansion of the individual arguments, i.e.
"$@"
It makes sense to me to include this in the guidelines so +1.
Incidentally, I'm not sure what the current policy on hashbangs is (#!/usr/bin/sh?, indifference?).
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
If you change that, I suggest to add an "exec", too. We don't need a useless shell in the background, right?
#!/bin/sh
exec "$JAVA_HOME/bin/java" -jar '/usr/share/java/logisim/logisim.jar' $@
Incidentally, I'm not sure what the current policy on hashbangs is (#!/usr/bin/sh?, indifference?).
I believe "/bin/sh" is required by POSIX and must provide a POSIX compliant shell, so /bin/sh is the portable hashbang. If you want bash, usr /usr/bin/bash I guess.
Last edited by progandy (2014-04-09 23:14:10)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
So, the proposed changes should be resp.
#!/bin/sh
exec "$JAVA_HOME/bin/java" -jar '/usr/share/java/PROGRAMNAME/PROGRAMNAME.jar' "$@"
and
#!/bin/sh
exec "$JAVA_HOME/bin/java" '/usr/share/java/PROGRAMNAME/PROGRAMCLASSNAME' "$@"
I can edit the wiki page myself, but I think it's good that someone else also agrees with this change.
Offline
I agree, for whatever it's worth.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Ok, done!
Offline