VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: How To Install Sun's Java Development Kit  (Read 6096 times)

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
How To Install Sun's Java Development Kit
« on: September 22, 2008, 11:54:30 am »

You should have the Java Runtime Environment already, but the Development Kit comes with its own Runtime Environment, so we'll remove it.

1. Copy the files /etc/profile.d/jre.csh and /etc/profile.d/jre.sh to somewhere safe;

AS ROOT:

2. Remove the jre package ("removepkg jre"). Those files in /etc/profile.d will be removed as well;

3. If necessary, remove /usr/lib/java;

4. Get the JDK from http://java.sun.com/javase/downloads/index.jsp;

5. Copy the file to /usr/lib and launch it in a console;

6. It will extract the contents into a jdk directory inside /usr/lib;

7. Inside /usr/lib, create a symlink to the new directory called java, by typing for example "ln -s /usr/lib/jdk-1.6.0_07/ /usr/lib/java";

8. Copy the previously backed up file jre.sh and jre.csh to /etc/profile.d (this will add java to your path);

9. Copy the browser java plugin from /usr/lib/jdk1.6.0_07/jre/plugin/i386/ns7/libjavaplugin_oji.so to /usr/lib/mozilla/plugins
(perhaps saving the previous plugin somewhere in case you want to go back to jre)
Not sure about non-Mozilla browsers, but it should be the same plugin, only to a different directory.
« Last Edit: March 02, 2009, 09:48:10 pm by wcs »
Logged

edwarben89

  • Member
  • *
  • Posts: 10
Re: How To Install Sun's Java Development Kit
« Reply #1 on: October 29, 2008, 06:22:28 pm »

I followed these directions very carefully except I did not find usr/lib/java in my filesystem.  Now I do not have JRE or JDK working.

Thanks in advance.
Logged

lagagnon

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1922
Re: How To Install Sun's Java Development Kit
« Reply #2 on: October 29, 2008, 07:17:56 pm »

In step #7 did you change the directory to the proper named version of jdk, not -1.6.0_07 but rather the actual version number you downloaded?
Logged
"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
Re: How To Install Sun's Java Development Kit
« Reply #3 on: October 29, 2008, 11:13:20 pm »

If you started the jdk installer inside /usr/lib (as root) and the files were properly extracted into a directory called jdk-etc.., then the only things needed to get it working are:
* a link to the new directory called /usr/lib/java (you can also do this with some file managers like Thunar -- Edit > Make Links, then rename the link to "java")
* the previous jre.sh and jre.csh files inside /etc/profile.d/
* copy the browser plugin to /usr/lib/mozilla/plugins

You might need to login again, so that java is in your path.

Can you give us some more information, and check if these files exist in the right places?
Logged

edwarben89

  • Member
  • *
  • Posts: 10
Re: How To Install Sun's Java Development Kit
« Reply #4 on: October 30, 2008, 09:36:48 am »

After posting I used GSlapt to restore JRE.  Today while I was trying again I realized that I had downloaded the JRE package!  So I am currently downloading the JDK package.

By the way, I feel dumb since this isn't the first time I manually installed packages.
Logged

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
Re: How To Install Sun's Java Development Kit
« Reply #5 on: October 30, 2008, 11:30:57 am »

Quote
By the way, I feel dumb

No need to.  :)
Especially with java, you get all these different editions and the like....
Logged

cwellings

  • Member
  • *
  • Posts: 6
Re: How To Install Sun's Java Development Kit
« Reply #6 on: September 01, 2009, 10:14:08 pm »

lol thanks for this,

i doubt i woulda figured it out without this
 ;D
Logged