Icon Launcher + .jar file

NoOp glgxg at sbcglobal.net
Fri Jul 6 20:18:07 UTC 2007


On 07/06/2007 01:05 PM, sktsee wrote:
> On Fri, 2007-07-06 at 11:49 -0700, NoOp wrote: 
>> On 07/06/2007 09:45 AM, Derek Broughton wrote:

>> > 
>> > I'll bite.  Is Gnome really so primitive as to not be able to work
>> > that out? As far as _Linux_ is concerned, a jar is just as executable
>> > as a script.
>> 
>> You know actually now that you mention it, I think that it should. I'm
>> wondering if perhaps there is something wrong with the mime type and/or
>> gnome-mime-database. I checked the permissions for the jar Javascore.jar
>> file and it is registered as 'application/x-java-archive' and set to
>> allow executing as a program. And in /usr/share/mime/globs I do show:
>> application/x-java-archive:*.jar so I'm not sure what the problem is at
>> this point.
>> 
>> 
> If you were to create the launcher as a "File" type instead of an
> "Application" type, it would work with out having to prefix "java -jar"
> to the path. This method will use the same mechanism that Nautilus uses
> to handle the jar file - a lookup in the mime-database and then, I'd
> guess, and exec to the appropriate app (java) that handles the file's
> mime type.

By golly you're right. Just tested using "File" instead of "Application"
and it worked straight out of the box. Thanks!

I'm off to http://www.gnome.org/learn/ to see if I can better understand
 how each works.

> 
> Also note that trying to execute the jar file in a shell (just the file,
> no "java -jar" in front) won't work unless you register an interpreter
> with the kernel to handle it. Man update-binfmts for more info.
> 

Thanks again :-)







More information about the ubuntu-users mailing list