| Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Fri 30 Dec 2005, 14:16 Post subject:
How do I run a .jar file? |
|
As I understand it .jar is a java file and I have sun java installed so eh . . .
how do I run it? (just clicking would be nice . . .)
Thanks in advance for any help
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Fri 30 Dec 2005, 14:21 Post subject:
|
|
You must add a small shellscript.
| Code: | #!/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: | #!/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, 14:25; edited 1 time in total
|
|
Back to top
|
|
 |
Guest
Guest
|
Posted: Fri 30 Dec 2005, 14:25 Post subject:
|
|
java -jar blahblah.jar
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Fri 30 Dec 2005, 16:35 Post subject:
|
|
| Anonymous wrote: | | java -jar blahblah.jar |
thanks guys
yep that worked - got this going . . .
http://drawswf.sourceforge.net/
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
klhrevolutionist

Joined: 08 Jun 2005 Posts: 1124
|
Posted: Fri 30 Dec 2005, 17:40 Post subject:
addition |
|
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!
|
|
Back to top
|
|
 |
1ColdBeer

Joined: 02 Oct 2005 Posts: 36
|
Posted: Fri 30 Dec 2005, 18:43 Post subject:
Re: How do I run a .jar file? |
|
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 Backyard cam. Try Mepis Linux today! See my avitar's NEW PUPPIES HERE
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6855 Location: Perth, Western Australia
|
Posted: Fri 30 Dec 2005, 18:49 Post subject:
|
|
Lobster, are you using John Murga's Java PupGet package?
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Fri 30 Dec 2005, 19:55 Post subject:
|
|
| 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 WIKI
|
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Fri 30 Dec 2005, 22:21 Post subject:
|
|
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 ...
|
|
Back to top
|
|
 |
|