Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

installing java on linux

 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I want to install java1.4.0 on linux. Please provide me exact link to download software and steps to install it. Your help is higly aprreciated.

Shivani
 
Vijayendra V Rao
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can download the JDK from here.

You can find the installation instructions here.

Hope this helps.
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Vijeyendra,
thanks for replying but when I try to download folowing file
RPM in self-extracting file (j2sdk-1_4_2_06-linux-i586-rpm.bin, 33.63 MB from the url you sent it opens the code but does not give me option to download it. Any idea

Shivani
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay I was able to install java as directed by that url but now when I run java -version I am getting following ...
java -version
libgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions. libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.

This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


please help ASAP.

SA
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

and


Theses alternatives is a system to manage symbolic links at a central place.
I wasn't happy to have it and got rid of it. But perhaps you like it.
If the hints don't lead you to a solution, mail again.
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
stefan,

I am not expert in Linux I tried following..
sanand$man update-alternatives
No manual entry for update-alternatives
sanand$update-alternatives --help
-bash: update-alternatives: command not found

Please explain in detail what's happening and what needs to be done.

Your help is appreciated.

SA
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set your PATH variable so that the OS can find the new Java installation. You can do this by adding a line to your .bashrc file like this:


HTH

Layne
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried see following but java -version still not working.

sanand$export PATH=$PATH://usr/java/j2sdk1.4.2_06/bin
sanand$pwd
/usr/java/j2sdk1.4.2_06/bin
sanand$java -version
libgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions. libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.

SA

This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try

This will make it so that your installation will be searched before other locations in the PATH. It looks like your shell is still trying to use the gcj instead of Sun's JDK.

Layne
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Layne!!
it worked
sanand$java -version
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
SA
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A system with the 'alternatives' installed, but missing the 'update-alternatives' is perhaps somehow broken.

And missing man pages are bad practice.
Which distribution are you using?

A rude solution would have been to remove the altenatives for java:


If you would have liked to use it for your installation, you would have issued:


I'm not sure whether it would have been neccessary to repeat this step for
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic