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 Sat 30 Aug 2014, 18:32
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 Posts_count  
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_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

Edited_time_total
Back to top
View user's profile Send_private_message Visit_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_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_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_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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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