WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: HOW TO Install Sun Java JDK6 inc browser plugins Micro/Tinycore  (Read 12467 times)

Offline Terminator3000

  • Jr. Member
  • **
  • Posts: 64
HOW TO Install Sun Java JDK6 inc browser plugins Micro/Tinycore
« on: October 01, 2010, 01:21:03 PM »
I came up with this little guide to installing the official Sun Java jdk6/jre6 after some initial drama on my Microcore/LXDE fixed hard drive rig.

THIS COVERS JDK6(which includes JRE) on Micro/Tinycore

The main reason is that some popular apps will only work with Sun Java as opposed to openjdk,such as Aptana Studio3 (possibly the best Dreamweaver alternative for linux without installing wine)BlueJ java ide and others. Aptana is also good for php,ruby and others if you like to use an ide.Should be good for java swing also.

So anyway if you need the official Sun Java jdk/jre its not too difficult, just follow the 10 steps below.
(If you are installing an earlier or later version obviously just amend the relevant lines)


GETTING AND INSTALLING JAVA JDK6

(In vi hit 'i' to enable insertion, arrow up/down/left/right to navigate,type your entries and to finish hit 'esc' then 'colon x' (+hit enter) to exit saving written file)

START

1.In terminal: sudo mkdir /usr/java

2.Then:   vi /opt/.filetool.lst    add line 'usr/java/'      and save
 
(add new java folder to /opt/.filetool.lst as usr/java/)


3.Obtain Java jdk1.6.0_21 (jdk6) from http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html    

(get the i586bin  release NOT rpm + put in home dir)

4.In terminal:  sudo chmod +x <java  bin file name>       (to make executable)

5.Double click to extract the java1.6.0_21 folder

6.Then:    sudo mv jdk1.6.0_21 /usr/java/jdk1.6.0_21                  That's it,DONE !


SETTING THE PATH TO JDK6 INSTALLATION

Now java is installed set thePATH.  (credit to danielibarnes for this)

 
7.In terminal:  sudo vi /etc/profile.d/java.sh         add  exactly as follows

export JAVA_HOME=/usr/java/jdk1.6.0_21
export PATH=$PATH:$JAVA_HOME/bin
        
 and save        (esc, then 'colon x')

8.Then: vi /opt/.filetool.lst      and add line  

etc/profile.d/java.sh               and save.        

You now have the export path set in  the  /etc/profile.d/java.sh file

REBOOT


9. To check that it is installed correctly in terminal type:  
        echo $JAVA_HOME

and the response should be /usr/java/jdk1.6.0_21  if not check the above steps AGAIN.

THE BROWSER PLUGIN

To enable the java in browsers (mine are Epiphany and Chromium) do the following.

10.In terminal: cd /usr/lib/mozilla/plugins                (or path to your plugin dir/symlnk)  

sudo ln -s /usr/java/jdk1.6.0_21/jre/lib/i386/libnpjp2.so     (or path to plugin you need)                        

vi /opt/.filetool.lst          add line

usr/lib/mozilla/plugins/libnpjp2.so                             (or path to your plugin dir/symlnk)                                      

and save    

REBOOT and visit http://www.javatester.org/version.html   to check if working.


So we are just creating symlinks to the jre plugins that are within the jdk installation (no need for seperate jre) Various plugins are located in both the /lib/i386 and /plugin/i386 folders in the jre directory,which is itself within the jdk directory.

There is also a jdk7 available from some sources though I have not tried it I would imagine it is a similar procedure.

The one symlink seems to work for both the above browsers although depending on your browser you may have to use different plugins,just alter the paths accordingly.

I believe Epiphany has to be installed for the Chromium one to work,or it may just be that the Epiphany one(mozilla) also enables java in Chromium.If you only have Chromium and there isnt a mozilla/plugins folder or it doesnt work then you can try /usr/local/chromium-browser/plugins. In any case you would cd to your browsers plugin directory then issue ln -s <path to whatever plugin you are trying>

All in all its a pretty straightforward procedure.





    

« Last Edit: October 27, 2010, 08:10:05 PM by Terminator3000 »

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: HOW TO Install Sun Java JDK6 inc browser plugins Micro/Tinycore
« Reply #1 on: May 21, 2014, 06:59:53 PM »
about the tutorial.
in regards to #5

Code: [Select]
5.Double click to extract the java1.6.0_21 folder

I double-clicked the folder and it seemed like it did nothing, so I ran

Code: [Select]
./jdk1.6.0_21.bin

the terminal processed the file, yet there was still nothing to show in the folder (I wanted to be sure that I executed the file).  so when I moved on to #6:

Code: [Select]
6.Then:    sudo mv jdk1.6.0_21 /usr/java/jdk1.6.0_21

there was no file by that name, but there was a folder.  shouldn't that step read?:

Code: [Select]
6.Then:    sudo mv jdk1.6.0_21/ /usr/java/jdk1.6.0_21/

notice the forward slash after 21, indicating it is a folder.

did I do something wrong?
backup...backup...backup

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: HOW TO Install Sun Java JDK6 inc browser plugins Micro/Tinycore
« Reply #2 on: May 21, 2014, 07:09:38 PM »
You don't need to tell it the source is a directory. It knows that.

Offline ejames82

  • Full Member
  • ***
  • Posts: 183
Re: HOW TO Install Sun Java JDK6 inc browser plugins Micro/Tinycore
« Reply #3 on: May 21, 2014, 07:12:09 PM »
thank you, gerald_clark.  :)
backup...backup...backup