• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Installing Java on Linux (FC6)

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I installed java_ee_sdk-5_02-linux.bin from the java.sun.com download page. I know where it installed to...bin path = /opt/SDK/jdk/bin...

The problem comes when I try to install java-tools-bundle-linux.sh...I 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)??

Thanks.
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 http://java.sun.com, downloads
2. Download whatever version you prefer (EXAMPLE: jdk-6-nb-5_5-linux.bin)
3. Copy it to your system and install it:
EXAMPLE:
chmod +rx jdk-6-nb-5_5-linux.bin
./jdk-6-nb-5_5-linux.bin
<= THIS SHOULD INCLUDE ALL OF THE JRE, THE JDK, AND THE NETBEANS IDE



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:
$PATH
... and ...
$JAVA_HOME

'hope that helps .. PSM

PS:
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 ]
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??

/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/SDK/jdk/bin:/opt/SDK/jdk/jre/bin



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
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 pc...so thanks to those who posted.
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
PATH=$JAVA_HOME:$PATH
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic