Yesterday i learned a little about shell script, and have an idea of writing a script for running a Java jar file on right click. It's simple and easy to understand. Hmmm... a good start.
Copy following text into a file named "runJar"(maybe another name you like ^_^), put the file in ~/.gnome2/nautilus-scripts/ directory(~ is your home directory), after that, when you right click on a jar file, you can run it via [scripts -> runJar]. Hope it will be usefull for java guys.
#!/bin/bash
#
# Nautilus script -> execute a jar
#
# Owner : Andy Luo
#
andyluo197(AT)gmail.com#
http://www.blogjava.net/andyluo#
# Licence : GNU GPL
#
# Copyright (C) Andyluo
#
# Ver. 0.1-1 Date: 10/31/2005
# Execute a jar file.
#
# Ver: 0.1 Date: 10/31/2005
# Initial release
#
# Dependence : JRE
#
for arg
do
$(java -jar "$arg")
done
版权所有 罗明