VectorLinux
July 26, 2014, 12:44:12 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: How To Install Sun's Java Development Kit  (Read 5241 times)
wcs
Packager
Vectorian
****
Posts: 1144


« on: September 22, 2008, 10: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


« Reply #1 on: October 29, 2008, 05: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



WWW
« Reply #2 on: October 29, 2008, 06: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


« Reply #3 on: October 29, 2008, 10: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


« Reply #4 on: October 30, 2008, 08: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


« Reply #5 on: October 30, 2008, 10:30:57 am »

Quote
By the way, I feel dumb

No need to.  Smiley
Especially with java, you get all these different editions and the like....
Logged
cwellings
Member
*
Posts: 6


« Reply #6 on: September 01, 2009, 09:14:08 pm »

lol thanks for this,

i doubt i woulda figured it out without this
 Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!