LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 04-19-2005, 07:57 PM   #1
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Rep: Reputation: 0
J2SE: Configuration


I've installed jdk1.5.0 and I believe I have it running properly, at least according to the test. Then I get to this step in the instructions and I think I understand but I just want to make sure.

Code:
Set the PATH and JAVA_HOME environment variables: (/etc/profile, $HOME/.bashrc or $HOME/.bash_profile).

PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
JAVA_HOME=/usr/java/j2skd1.4.2_04
export PATH
Do I just place the following anywhere inside /etc/profile, does it matter where it is or just as long as it is in there. When it talks about $HOME is it talking about /root/.bashrc and /root/.bash_profile?
 
Old 05-09-2005, 08:37 AM   #2
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
All you need to do is edit your .bashrc file in your home folder for each user. It is the easiest way to do it. Here is my file.

# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

export PATH=$PATH:/usr/java/jre1.5.0_03/bin

Then close the terminal and reopen it and try this command (of course substitute where you have installed Java).

java -version

and it should give you something like this:

[ryan@localhost ~]$ java -version
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
[ryan@localhost ~]$
 
Old 05-09-2005, 11:33 AM   #3
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 70
You can place your script in /etc/profile.d, name it something like java.sh and make it executable.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing J2SE 1.5.0 ivoencarnacao Slackware 2 10-03-2005 03:34 PM
Slackware 10.1 and J2SE 1.4.x License question nosaku Slackware 6 12-15-2004 10:23 AM
How to set J2SE SDK environment variables on Fedora 2 jjunge Programming 2 07-28-2004 03:27 PM
How to install J2SE on Core 1? DeepSPiN Fedora 0 02-16-2004 06:10 AM
problems installing J2SE on REDHAT 9.0 sP1v Linux - Newbie 5 05-15-2003 08:03 PM


All times are GMT -5. The time now is 09:57 AM.

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
Open Source Consulting | Domain Registration