java -jar Myrtle-1.8.11.jarHowever, you may have encountered difficulty running Myrtle from within a graphical file browser like Nautilus. This is useful if you want to quickly run Myrtle off of a USB flash drive for example and don't want to bother opening an xterm. Unfortunately, the default Nautilus behavior is to treat a .jar file as a file archive and it will open and start browsing its contents for you... Often not what you want to see.
For those on Linux/Unix running a Gnome-based desktop, try the following trick. Copy the following file to your ~/.local/share/applications folder where '~' represents your home directory path.
Save the following in a text file named execjar.desktop
[Desktop Entry]From Nautilus you will now be able to "right-click" on the jar file (e.g. Myrtle-1.8.11.jar) that you want to run and then select Open With-->Other Application... Select execjar from the list and Myrtle will launch. That's it!
Encoding=UTF-8
Type=Application
Exec=java -jar %f
#You may need to modify icon tag
#to suit your system.
Icon=java-1.7.0
Name=execjar
Comment=Run an executable jar file
Using the above method you are in fact able to launch any executable jar file when needed, but still be able to browse .jar file contents according to the default behavior of Nautilus when wanted.
No comments:
Post a Comment