LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2005, 03:35 PM   #1
eras
LQ Newbie
 
Registered: Apr 2005
Posts: 1

Rep: Reputation: 0
Howto install/use java(jre)?


Hi all!

I have been using Linux for a few days and I just tried to install Java Runtime Enviroment. Well, I downloaded the self-extracting .bin file and installed it to /usr/java, but I have no idea how to use it...

What should I do if I wanted to run java programs like "java <program name>"? Is there a way to install programs so that I can use them like that? Should I install them to some special place or what?

Thanks for your time, I hope someone has time to aswer this =)
 
Old 04-12-2005, 04:29 PM   #2
fatrandy13
Member
 
Registered: Jun 2004
Location: new jersey
Distribution: anything debian based, long live apt-get
Posts: 230

Rep: Reputation: 30
what type of file are you trying to open using JRE ..... a .jar file?
 
Old 04-12-2005, 05:42 PM   #3
resego
Member
 
Registered: Mar 2005
Posts: 37

Rep: Reputation: 15
eras....are you asking how you can run HelloWorld and staff like that..cuz to be honest your question is not clear
 
Old 04-12-2005, 05:52 PM   #4
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by resego
eras....are you asking how you can run HelloWorld and staff like that..cuz to be honest your question is not clear
Yes it is.

You'll need to add the java bin directory to your path. The best way to do this so that it's there for every user is to edit /etc/profile as root and find the line that says PATH=........etc........

At the end of the line (but inside any "" marks) add:
Code:
:/usr/java/bin
(if that's where you put java and that's where its bin directory is...)

For that to take effect you'll either need to reboot or:
Code:
source /etc/profile
I actually have the first line of my .bashrc file (in each user's home dir) set to the above source line because sometimes bash run from xterm (i.e. as a non login shell) does not include the things in /etc/profile.
 
Old 04-12-2005, 06:00 PM   #5
resego
Member
 
Registered: Mar 2005
Posts: 37

Rep: Reputation: 15
does your /usr/java file have a version of java in it
...just type this at the terminal:
$ which java
and post the output here..
 
Old 04-12-2005, 06:05 PM   #6
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by resego
does your /usr/java file have a version of java in it
...just type this at the terminal:
$ which java
and post the output here..
/usr/java is a 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
Java SDK & JRE Install Avi Linux - Software 1 10-02-2005 09:32 PM
Java JRE merchtemeagle Linux - Newbie 3 10-15-2004 02:38 PM
Java (jre/sdk) debian install Zaskar Debian 6 04-01-2004 07:32 PM
java jre luap Linux - Software 5 02-17-2003 12:41 AM
Java jre-1.3.1_02 can't find libjava.so after install rhammack Linux - Software 0 01-17-2002 10:39 PM


All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration