[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian java howto for sarge?

On Tue, 2004-09-28 at 17:14, Wim De Smet wrote:
> > And how do I get .jar files to work by doubleklickind under kde 3.2.3?
> > Are there maybe some security problems?
> There's probably some sort of configuration dialog in KDE to establish
> a relationship between filetypes and programs. Find it and add jar to
> it. The command to be executed should probably be "java -jar"
Note that this will only work for jars that are "executable" (ie have a
Main-Class entry in their manifest). It will not be spectacularly
successful for those jar files that are missing this entry in their

I wrap it in a script like this ...

#!/usr/bin/perl -w

#check that we have a jar file on the command line
if ( "$jar_file" eq "" ) {
} else {
  system("java -jar $jar_file") && system("gdialog  --msgbox \"Jar file
\"$jar_file\" is not executable\n\" 100 100");

#report usage info
sub usage
 system("gdialog --msgbox \"usage: run-jar.pl foo.jar\" 100 100");

                  ( / \ )
                 (  O O  )
_______________oOOo-( )-oOOo_________________
 Blake Swadling           blake@swadling.com
 Software Engineer   http://www.swadling.com
                oooO  (   )
               (   )   ) /
                \ (   (_/

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: