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 ona 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@hotmail.com
#http://spaces.msn.com/members/andyluo197
#
# 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


版权所有 罗明
posted on 2005-11-02 01:13 罗明 阅读(139) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: