File Association for JARS

NoOp glgxg at sbcglobal.net
Sat Jan 26 00:05:29 UTC 2008


On 01/24/2008 10:12 PM, Johnny Kewl wrote:
> Hello every1,
> 
> Let me first say, I dont use Ubuntu, use Debian occasionally, well
> whats actually happened is I figured out how to get it going, set up
> SAMBA etc etc... and its been reunning for years... I've completely
> forgotten how to use it, because it just doesnt break... thats the
> problem with linux ;)
> 
> Anyway... busy developing the product below... and I get questions
> from UBUNTU people... I'd like to add the precise instructions to the
> product, so they can get going.
> 
> The problem is that Java JAR files are both Archives and Executables.
>  Ubuntu seems to be set up so that a JAR looks like a ZIP file.
> 
> A java executable runs with the comand line java -jar %1
> 
> ie if the %1 is a Java file the application starts....
> 
> One does have to question the wisdom of Sun make file.jar behave as
> both but thats how it is.
> 
> So... what I'm looking for is the basic instructions to set up ubuntu
> so that if a user clicks on a JAR file the thing runs...
> 
> The area I'm really nor sure about is the relationship between the
> Desktop and the Browser mime type.. If I remember on Debian it was
> always a mission getting Mozilla and Gnome to do the same thing...
> 
> Hopefully Ubuntu is smarter than that....
> 
> So how to make Click on JAR run... on ubuntu in Firefox and default
> Desktop (looks like its KDE from emails)
> 
> Thanks.... If I dont reply immediately, its because our government
> has managed to plunge the country into darkness ;) Didnt build enuf
> power stations, or more likely sold power they didnt have... idiots! 
> If you see this from a SAcan... BBSFG it means ( Be Back Soon Fueling
> Genereator ;)

Not sure if this is what you are looking for, but when I run a java
program from a desktop icon (Gnome) I use the following launcher
instructions - for example, to run a program called javascore
(http://www.gromurph.org/javascore/):

java  -jar  /home/<homeuserpath>/javascore/JavaScore.jar






More information about the ubuntu-users mailing list