Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes Installing Java on Linux (FC6) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Installing Java on Linux (FC6)" Watch "Installing Java on Linux (FC6)" New topic

Installing Java on Linux (FC6)

Don Sartain

Joined: Dec 24, 2006
Posts: 11
Ok, I installed java_ee_sdk-5_02-linux.bin from the download page. I know where it installed to...bin path = /opt/SDK/jdk/bin...

The problem comes when I try to install need to know how to specify where the JRE is located...It gives me the following error message...

No compatible Java SE Runtime Environment (JRE) was found on this system.
The NetBeans(TM) 5.5 Preview installer requires at least JRE
version 5.0. Download and install a compatible JRE and try again or
restart the installer using the -is:javahome command line parameter to
specify the location of the JRE.

I've tried several ways of doing this, all to no avail. Can someone point me in the right direction?? Do I even have the right path (where the java and javac files are located)??


Don<br /> <br />"An unexamined life is not worth living." -- Socrates
Paul Santa Maria
Ranch Hand

Joined: Feb 24, 2004
Posts: 236
Did you really mean to install j2ee, or do you want the "standard" (J2SE) Java development kit?

If you want the latter, just:

1. go to, downloads
2. Download whatever version you prefer (EXAMPLE: jdk-6-nb-5_5-linux.bin)
3. Copy it to your system and install it:
chmod +rx jdk-6-nb-5_5-linux.bin

If you want the former, you *still* need to download a JRE (as in the instructions above) ... but you should also adjust/set the following two environment variables:
... and ...

'hope that helps .. PSM

One common "gotcha" is that Linux might have Gnu Java ("gjc") somewhere in the path. Although Gnu Java and Sun Java can co-exist on the same host ... it can also complicate things. Feel free to simply delete gjc if you're not using it.
[ December 25, 2006: Message edited by: Paul Santa Maria ]

Paul M. Santa Maria, SCJP
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
or at the very least set the global $PATH to have $JAVA_HOME/bin as the very first entry, thus overriding gcj or any other 3rd party thing calling itself "java" (liks Kaffe).

Don Sartain

Joined: Dec 24, 2006
Posts: 11
Yes, I meant to install the EE package. This package includes a JRE.

The JRE path is /opt/SDK/jdk/jre/bin

I adjusted the PATH to include /opt/SDK/jdk/bin and /opt/SDK/jdk/jre/bin, but I couldn't find the $JAVA_HOME reference.

I tried "echo $JAVA_HOME" but got a blank line as a result.

How can I create that??


is my full path, and even though FC6 did install some other version of JAVA, I don't think it's actually running or in the path.
Don Sartain

Joined: Dec 24, 2006
Posts: 11
Well, I can still create/run Java programs with what I've got...I mainly wanted to download the tools bundle because it comes with the API docs...or so I thought...but it's working now, and if I really need to figure something out I can always do it on my thanks to those who posted.
Nicholas Carrier
Ranch Hand

Joined: Apr 14, 2005
Posts: 78
This might be old and I'm not sure if it will help (I run openSuse) but since you are echoing the JAVA_HOME variable and it's coming out blank I'm guessing you haven't exported it. In order for you to use a variable in Linux you have to export it. You can try it in the console like so:

JAVA_HOME=whaterever it is
export JAVA_HOME
export PATH

Then try whatever it is you were going to try. If it works you just have to do that in your profile. Also, does FC6 have Java in the package management system (YUM?)? I'd be surprised if it doesn't. If it doesn't, it definitely will soon now that Java has gone all Open Source on us

Teaching yourself anything is always the cheapest way, but it definitely takes a lot of time and effort.<br /> <br />Thank you javaranch <a href="http://""" target="_blank" rel="nofollow">Learn How to Ask Your Question</a> and be nice
I agree. Here's the link:
subject: Installing Java on Linux (FC6)
It's not a secret anymore!