Thread: Java Trouble
View Single Post
Old 12-08-2006, 09:28 PM   #13 (permalink)
JGuru
Wise Old Owl
 
JGuru's Avatar
 
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
Default Re: Java Trouble

@Mediator, your procedure is totally wrong!!

@Sykora, Here is the solution. I hope you have installed the Java JDK 5.0 'RPM' format.
Stanton Finley's procedure is for installing JRE, so that you can view Applets. For
Java developers , this is the procedure:

Download JDK 5.0(RPM format) & also J2SE 5.0 Documentation from here
Execute the file after logging in as root.
Configuration:
Open the Terminal Window & type:
$ su -
(Enter password)

# /usr/sbin/alternatives --config java

The Output:
There are 2 programs which provide 'java'.

Selection Command
--------------------------------------------------------------------------------
* 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+ 2 /usr/java/jdk1.5.0/bin/java

Now type 2, since you want the Sun's JDK 'java'.

# 2

Now type:
# /usr/sbin/alternatives --display java
You should see:
java - status is manual
link currently points to /usr/java/jdk1.5.0/bin/java
(The rest of the output follows here)

Also update the file : '/etc/profile.d/java.sh'
# gedit /etc/profile.d/java.sh

In the file, you should have the env variable 'JAVA_HOME'
JAVA_HOME=/usr/java/jdk1.5.0
export JAVA_HOME
PATH=$JAVA_HOME/bin: (The rest of path commands follow here)
export PATH

NOTE: Just check were Java is installed, this is given as a general procedure.
If you have installed 'JDK 5.0 Update 6' , it may be '/usr/java/jdk1.5.0_6'!!
So check it first.

Now save the file.
Logout & login to see the changes.
Now your JAVA problem should be fixed.
If you want to work in good Java IDE , as a beginner in Java language, NetBeans
is not for you. It's for Professional Java developers. Sun has developed a smaller
version of NetBeans called NetBeans IDE 5.0 BlueJ Edition. It's ideal for
programmers new to Java language & it's easy to use. Get it from here

Last edited by JGuru; 13-08-2006 at 12:08 AM. Reason: Automerged Doublepost
JGuru is offline