From: david <da...@da...> - 2004-09-14 22:35:22
|
In linux you can make jars and jnlp files executable ----------------# /opt/java/jnlpwrapper #!/bin/bash # the wrapper for binfmt_misc/jar /opt/java/j2sdk1.4/jre/javaws/javaws $1 ------------------- /opt/java/jarwrapper ---------------- #!/bin/bash # the wrapper for binfmt_misc/jar /opt/java/j2sdk1.4/bin/java -jar "$@" The following script tells the kernel how to execute jar and jnlp files -----/etc/init.d/java.sh ------------------------------------------------- #!/bin/sh modprobe binfmt_misc mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc echo ':ExecutableJAR:E::jar::/opt/java/jarwrapper:' > /proc/sys/fs/binfmt_misc/register echo ':JNLPfile:E::jnlp::/opt/java/jnlpwrapper:' > /proc/sys/fs/binfmt_misc/register Now, if a jar is in your path and the executable bit is on you can just type the name of the jar or then jnlp file like this : david@newport:~$ jscheme.jar JScheme 6.3 4/5/04 http://jscheme.sourceforge.net > |