LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 07-23-2004, 02:39 AM   #1
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Rep: Reputation: 15
What do i do with .jar files


i downloaded a java game and i think i have to do something with the .jar fiiles to install/play it. the problem is, i don't know what to do. i've figured out .bin's and .rpm's but i don't have any idea how to use java files.

thanks for any assistance
 
Old 07-23-2004, 03:19 AM   #2
Quis
Member
 
Registered: May 2001
Location: Germany, Süd-Baden
Distribution: Gentoo
Posts: 139

Rep: Reputation: 15
jar files are compiled and packaged java-code.

you can run it with:
java -jar JAVAJARNAME.jar

try java -h for more help
 
Old 07-23-2004, 03:27 AM   #3
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
ok, it says
bash: java: command not found

i'm no expert but does that mean i have to install something? if so, what exactly do i download?
 
Old 07-23-2004, 05:21 AM   #4
Quis
Member
 
Registered: May 2001
Location: Germany, Süd-Baden
Distribution: Gentoo
Posts: 139

Rep: Reputation: 15
Quote:
Originally posted by joeman3429

bash: java: command not found
this means that your java interpreter is not in you path, or you don't have java installed.

Quote:

.. but does that mean i have to install something? if so, what exactly do i download?
you have to install the java runtime environment "J2SE v 1.4.2_05 JRE"
you can get it from here: http://java.sun.com/j2se/1.4.2/download.html
 
Old 07-23-2004, 05:53 AM   #5
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
ok, i installed it, but it still doesn't recognize 'java'. what about the interpreter not being in my path? what does that mean, and what do i have to do?

thanks for the help
 
Old 07-23-2004, 06:30 AM   #6
Quis
Member
 
Registered: May 2001
Location: Germany, Süd-Baden
Distribution: Gentoo
Posts: 139

Rep: Reputation: 15
open a console and type $PATH
this returns all variables set in PATH. The PATH enables you to call a binary in e.g. /usr/bin without specifying the whole path of the binary.

you can add a directory to your PATH - var in your ".bash_profile" like this:
- open a console
- type: kwrite ~/.bash_profile &
- append: export PATH=$PATH:</directoy/to/your/jre/bin/folder> (without the brackets)
- save it

it might be nescessary to relogin in your gnome/kde.

Last edited by Quis; 07-23-2004 at 06:32 AM.
 
Old 07-23-2004, 02:51 PM   #7
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
thanks guys, i really apreciate all the help
 
Old 07-23-2004, 05:12 PM   #8
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
now i'm installing a bin file and it says that the java vm is not in my path
in the terminal i typed:
kwrite ~/.bash_profile

then i put the path of jvm at the end, this is what is in the file:

Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export USERNAME BASH_ENV PATH

export PATH=$PATH: /usr/java/j2re1.4.2_05/bin
i put it on the last line
and when i type $PATH i don't see it listed

any advice
 
Old 07-24-2004, 12:57 AM   #9
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
I just had the same problem now, give this a shot.

Code:
PATH=$PATH:/path/to/j2re/*  <-- Don't forget the * at the end
Try and run the .bin file again and see how you go. If this works, then you can go about putting it in your .bash_profile if need be.

Kristijan
 
Old 07-26-2004, 12:14 AM   #10
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
sorry, its taken awhile for me to post back...

this is what i get:

[root@localhost root]# PATH=$PATH: /usr/java/j2re1.4.2_05/*
bash: /usr/java/j2re1.4.2_05/bin: is a directory

i thought the point was for PATH to point to directories, so why do i get the error message. i checked $PATH and its not listed in it.

thanks
 
Old 07-26-2004, 07:13 AM   #11
bluemak
LQ Newbie
 
Registered: Mar 2003
Distribution: FC2
Posts: 13

Rep: Reputation: 0
You could make a symbolic link to java and stick it in the /bin directory.
 
Old 07-26-2004, 11:00 AM   #12
vincebs
Member
 
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 494

Rep: Reputation: 30
Have you tried leaving out the space between PATH=$PATH: and the java directory?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
jar files Knowledgements Slackware 12 07-22-2005 03:36 AM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 05:26 AM
Jar files krazibon3 Linux - Newbie 3 08-05-2004 09:42 PM
Eclipse 3.0 and JAR files german Programming 1 02-22-2004 12:28 PM
jar files mlynch147 Programming 2 10-24-2001 07:11 AM


All times are GMT -5. The time now is 03:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration