How do I run a .jar file?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

How do I run a .jar file?

#1 Post by Lobster »

As I understand it .jar is a java file and I have sun java installed so eh . . .
:oops: how do I run it? (just clicking would be nice . . .)

Thanks in advance for any help
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

You must add a small shellscript.

Code: Select all

#!/bin/sh

### ensure, we are in the correct folder

mypath=`echo $0|sed 's/[^/]*$//'|sed 's/\/$//'`
if [ "$mypath" = "." ]; then
  mypath=`pwd`
fi
cd $mypath

java -Xmx256m -jar $mypath/ArtOfIllusion.jar
-Xmx256m reserves 256 MB for the Program, not everyone needs this option, but some do.
If the way to determine the correct folder does not work (maybe ROX 2.3), you need an absolute path:

Code: Select all

#!/bin/sh
mypath=/usr/local/ArtOfIllusion
cd $mypath
java -Xmx256m -jar $mypath/ArtOfIllusion.jar
Save it as "run-AOI" for example, make it executable (chmod 755 run-AOI or via rightclick), then you can click on it or drag it to the Desktop.

Mark
Last edited by MU on Fri 30 Dec 2005, 18:25, edited 1 time in total.

Guest

#3 Post by Guest »

java -jar blahblah.jar

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#4 Post by Lobster »

Anonymous wrote:java -jar blahblah.jar
thanks guys

yep that worked - got this going . . .
http://drawswf.sourceforge.net/

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
klhrevolutionist
Posts: 1121
Joined: Wed 08 Jun 2005, 10:09

addition

#5 Post by klhrevolutionist »

Correct java -jar blah.jar

Also, if you rename the blah.jar to blah.zip you can open up this file and take a look inside for goodies. Mostly pics, fonts etc..

FYI
Heaven is on the way, until then let's get the truth out!

User avatar
1ColdBeer
Posts: 36
Joined: Sun 02 Oct 2005, 14:39

Re: How do I run a .jar file?

#6 Post by 1ColdBeer »

Hi,
Lobster wrote: how do I run it? (just clicking would be nice . . .)
In rox right click blahblah.jar > set run action > Enter shell command > java -jar "$1"

That should make jar files clickable. (I bet you knew that)

Dave
Visit my [url=http://waltonpond.com]Backyard[/url] cam. Try [url=http://mepis.org]Mepis Linux[/url] today! See my avitar's[url=http://pupview.com]NEW PUPPIES HERE[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#7 Post by BarryK »

Lobster, are you using John Murga's Java PupGet package?

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

BarryK wrote:Lobster, are you using John Murga's Java PupGet package?
No I am using G2's Sun full version . . .

Be interesting to get a list of jar or java files in general that run with John Murgas tiny java
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#9 Post by GuestToo »

my Java installer downloads and installs Java 1.5.0_4 ... the latest version is Java 1.5.0_6 i think

it's easy to install Java anyway, you just download and run the installer from
http://www.java.com/en/download/manual.jsp

then you have to symlink from the Java plugin to the Mozilla/Firefox plugins folder, and setup PATH and JAVA_HOME

my installer should setup PATH and JAVA_HOME in /etc/profile.local, but it sets it up in /etc/profile, so upgrading Puppy can disable running java from the command line (java -jar blah.jar)

it's another item in my todo list ...

Post Reply