Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 31 Jul 2014, 11:58
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How do I run a .jar file?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: 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 . . .
Embarassed how do I run it? (just clicking would be nice . . .)

Thanks in advance for any help

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: 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
View user's profile Send private message Visit poster's website 
Guest
Guest


PostPosted: Fri 30 Dec 2005, 14:25    Post subject:  

java -jar blahblah.jar
Back to top
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: 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/

Cool

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
klhrevolutionist


Joined: 08 Jun 2005
Posts: 1124

PostPosted: 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
View user's profile Send private message 
1ColdBeer


Joined: 02 Oct 2005
Posts: 36

PostPosted: 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
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 30 Dec 2005, 18:49    Post subject:  

Lobster, are you using John Murga's Java PupGet package?
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: 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
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0723s ][ Queries: 12 (0.0075s) ][ GZIP on ]