HOWTO install Java the hard way

How to do things, solutions, recipes, tutorials
Message
Author
Bruce B

HOWTO install Java the hard way

#1 Post by Bruce B »

This HOWTO was written by Sit Heel Speak. Originally posted in the beginners forum, then lost in the shuffle. Later added to the HOWTO section by Bruce B

NOTE: Before starting this how to, please read the follow up
posts by other users, especially the one by Bluedogruns

--------------------------------------------------------------

I've just installed the current Java Runtime Environment (1.6.0.02) into Puppy 2.17.1 (with WhoDo's EZPup 2.1.7R2) directly from Sun, no dotpup involved. Here's the procedure. I composed this so a French-speaker can translate it using Babelfish:

1. Open Seamonkey. Surf you to
http://www.sun.com/

2. In the lower right, press "Java for games, apps, and a whole lot more."

3. Press you the green "Free Java Download" button.

4. Press you the green down-arrow "Linux (self-extracting file)" button.

5. A dialog box opens, "Opening jre-6u2-linux-i586.bin".

6. Be sure that "Save it to disk" is highlighted.

7. Click you the "OK" button.

8. Click you the "Browse for other folders" line.

9. In the left window, double-click "File System".

10. Grab the "Enter name of file to save to..." window's title bar and move the window to the center of your screen.

11. In the right window, scroll down to "usr" and doubleclick.

12. Scroll down and doubleclick "local".

13. Scroll down and doubleclick "bin".

14. Click you the "Save" button.

15. Wait you for the 18+MB download to conclude. You will see the download's progress in the "Download Manager" window, which you can see by pressing the tiny green down-arrow on the taskbar.

16. Open you Puppy's lower-left Menu (Start) button, Filesystem - Rox-Filer file manager.

17. Press you the up arrow at top left of the Rox window. This places you in / .

18. Click you the "usr" icon.

19. Click you the "local" icon.

20. Click you the "bin" icon.

21. Right-click the icon for jre-6u2-linux-i586.bin (which you have just downloaded).

22. Highlight "File 'jre-6u2-linux-i586.bin'" and roll you the mouse to the right and roll to "Properties" .

23. Left-click "Properties" .

24. Click you the checkbox "Exec" (=make executeable) in the "Owner" row.

25. Click the Close button.

26. Right-click in the whitespace of the /usr/local/bin Rox window.

27. Roll down to "Window" and slide the mouse right and to "Terminal here" .

28. Left-click "Terminal here" .

29. At the # prompt, issue the command

./jre-6u2-linux-i586.bin

30. You see the license. Repeatedly, but slowly, press the "Page Down" key until you see the word "More" no longer.

31. Now you see "Do you agree to the above license terms? [yes or no]"

32. Press y {enter} .

33. Now Java unpacks. In a minute you see "Done."

34. Menu - Filesystem - Rox-Filer

35. Up-arrow usr lib mozilla plugins

36. Right-click in whitespace in this Rox window, Window-->Terminal here .

37. Create you a symbolic link: issue you this command:

Code: Select all

ln -s /usr/local/bin/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.so
38. Click you in Seamonkey

Edit - Preferences - Advanced (click on the word "Advanced") - click the "Enable Java" button.

39. Click you in Seamonkey

Edit - Preferences - Advanced (click on the + sign) - Scripts and Plugins

40. Be sure that "Enable JavaScript for Navigator" is checked.

41. Edit - Preferences - Advanced (on the + sign) - Cache - Clear Cache

42. Close Seamonkey and restart it.

42. Now surf to

www.sun.com

43. At the lower right, click "Java for games, apps, and a whole lot more"

44. Click the tiny "Do I have Java?" phrase.

In a few seconds, you should see "Congratulations!"

Now you have Java.

You can get rid of the installer

/usr/local/bin/jre-6u2-linux-i586.bin

(either delete it or move it off to another drive)

------------------
by Sit Heel Speak
Last edited by Bruce B on Tue 18 Sep 2007, 03:06, edited 1 time in total.

descoffey
Posts: 4
Joined: Tue 11 Sep 2007, 11:08

Java

#2 Post by descoffey »

Hi and thanks for a really idiot-proof instruction for Java installation.
I was doing well until the issuing of the symbolic link.
All I get is "command not found"

Any further help for this newbie would be great (I'm trying to get Logmein to work).

Des

Bruce B

#3 Post by Bruce B »

ln is a valid command - perhaps you made a typo.

If you don't think so, hope you have suggestions about what you think happened.

descoffey
Posts: 4
Joined: Tue 11 Sep 2007, 11:08

Command problem

#4 Post by descoffey »

Hi Bruce and thanks for taking the time and trouble to respond.
No typos here.
I am attaching an image of what happens when I try to run this command.
Maybe this will throw some light?

Thanks again.

Des
Attachments
captured.jpg
(155.41 KiB) Downloaded 25528 times

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

no in but ln (small L and small N).
Stands for LiNk.

Mark

User avatar
Bluedogruns
Posts: 38
Joined: Wed 12 Sep 2007, 23:31

I know what is wrong.

#6 Post by Bluedogruns »

Hi;

I am new to Puppy and Linux and have had to ask 3 or 4 questions myself to get Puppy just the way I want it. Actually getting Java installed was one of my questions too.

Even as a newbie I have figured what is wrong here and following these instructions to the letter will not make it work. Took me a couple of hours to figure out everything. Now I can contribute something for the help I got from others.

Let me start by saying if it was not for this post in the first place I would still be working getting Java going, but since I am persistent I have the solution.

I followed these instructions and had the same issue. I dug into it deep checking on the Sun site and double checking everything close and here is how to make it work. I have three things for you to follow.

First things first go to the folder where you made your symbolic link and delete the one you created it will not work should be in
usr/lib/mozilla/plugins (I don't know how to edit the link so just recreate it).

Now follow the same instructions that you followed before to recreate the link except this time do the following:

ln -s /usr/local/bin/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so

You will notice all you are doing is not putting this part of the command ./libjavaplugin_oji.so back in the link because having that gives the link the incorrect path. See original command below.
ln -s /usr/local/bin/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.so
You will now have Java working in Seamonkey, but you are not done if you have Firefox.

Somewhere in your folder structure you will have a Firefox folder. On my machine it is located /usr/local in that location there is a Firefox folder. In the Firefox folder there is another plugin folder. You need to follow the same instructions to create a symbolic link there just like you did in the mozilla/plugin folder.

Now you will have Java in Firefox.

There is one last thing though. If you happen to look on the Sun site to see their manual setup instructions they state in the path for the symbolic link to go to folder ns7-gcc29. There is a library in that folder with the same name as the one in the ns7 folder. It is a bigger file. It seems to work ok if you use it in the Seamonkey/Mozilla plugin folder but if you us it for the Firefox plugin folder as soon as you start to check if Java is installed your Firefox will crash.

Hope this helps others out.
Blue

descoffey
Posts: 4
Joined: Tue 11 Sep 2007, 11:08

HOWTO install Java the hard way

#7 Post by descoffey »

Great!

Many thanks Bluedogrun, MU and Bruce B.
You've all been really helpful.
I can now use just Puppy on my laptop to access my work PC (Sadly this has to run M$)

Des

pk007
Posts: 2
Joined: Wed 19 Sep 2007, 15:13

one more problem...

#8 Post by pk007 »

Hello,

(First: sorry for my bad English... Wink )

Thank's for this very good and easy howto!
But I still have a problem:
I've installed Java and it works fine.
But when I restart PuppyLinux (It is installed on an usb-flash-device),
the symbolic link is ereased and Java doesn't work.
What can I do...?

moncha
Posts: 24
Joined: Fri 14 Sep 2007, 16:06

#9 Post by moncha »

Thanks. It wasn't that hard at all. Even this newb could do it. :)

User avatar
?xunil
Posts: 39
Joined: Wed 15 Aug 2007, 23:42

#10 Post by ?xunil »

i get this error in the terminal...
Creating jre1.6.0_02/lib/rt.jar
Error: write on output file failed err=28
ERROR: Failed to unpack JAR file:

lib/rt.jar

Installation failed. Please refer to the Troubleshooting Section of
the Installation Instructions on the download page.
any suggestions? i can't find the troubleshooting page at the java site.

User avatar
bobwrit
Posts: 283
Joined: Mon 12 Mar 2007, 23:33
Contact:

#11 Post by bobwrit »

This is the only way I install java.BTW my biology teacher require this kind of procedure(sp) for our labs(we have to write our own).
I need help with my forum. [b][u]LINK:[/u][/b][url]http://www.programers.co.nr/[/url]
[url]http://www.freewebs.com/programm/iframe.html[/url] is my gateway page...

User avatar
peppyy
Posts: 443
Joined: Mon 27 Jun 2005, 23:49
Location: VT USA
Contact:

#12 Post by peppyy »

Great Tutorial,

I can't seem to locate the mozilla plugins directory in tmxxine however to get java working in Seamonkey 2.1.1 I tried all the obvious locations but it seems there has been a default change for some of these files in Puppy 3.x. I also couldn't locate flash9 there although it works in Seamonkey.

Edit: Sorry I should not work on computers when I have the flue, It was right where it belonged. I created a link in the same way and it works just fine.

I used the middle button and dragged the link (relative) to the firefox plugin folder after I installed Firefox and it worked perfectly.
Puppy Linux...
It just works!

User avatar
kkpity
Posts: 112
Joined: Mon 27 Nov 2006, 16:16
Location: Brazil

#13 Post by kkpity »

I've followed all instructions step by step with no errors, but the test from Sun fails and it says that I have no java on my system.

I'm using puppy 3.01 from CD.

I've tested with seamonkey 1.1.2 (the default that comes in 3.01), 1.1.5 and 1.1.6.

I've also tested with java 1.6 update 2 and update 3.

I've inserted the link at:
/usr/lib/seamonkey-1.1.x/plugin (x is 2, 3 or 5),
/usr/include/seamonkey-1.1.x/plugin (x is 2, 3 or 5) and
/usr/lib/mozilla/plugins

I've also delete Cache and Javascript is enabled.

I've no Firefox on my system.

Any clue?

Thanks in advance

kkpity
Linux user #388359 (http://counter.li.org/)

User avatar
kkpity
Posts: 112
Joined: Mon 27 Nov 2006, 16:16
Location: Brazil

#14 Post by kkpity »

I solved this issue with following:

from:
http://www.murga-linux.com/puppy/viewto ... 15&t=11096

"..but I discovered why. When I tried to follow sbaguz's advice, above, I clicked (in SeaMonkey) Edit-Preferences and then the + beside Advanced, and then Scripts and Plugins. Enable Javascript for Navigator was enabled. At first though, I did not realize that I also need to click "Edit-Preferences" and then click "Advanced" itself, not the expansion + beside it, to bring up the Enable Java checkbox. And check it."

and also doing the "ln -s" to the following locations:
/usr/lib/seamonkey-1.1.6/plugins
/usr/include/seamonkey-1.1.6/plugin/

I'm using seamonkey-1.1.6 and jre 1.6 update 3.

Hope this help others with same issue.

Regards

kkpity
Linux user #388359 (http://counter.li.org/)

joris
Posts: 2
Joined: Wed 20 Feb 2008, 12:00

#15 Post by joris »

to set it up so you can run programs like Azureus
you have to add the path to the java binary in /etc/profile, and also add the java home variable, something like:
export JAVA_HOME=/usr/local/bin/jre1.6.0_02
PATH=$JAVA_HOME/bin:$PATH

and don't forget to

open up the actual azureus executable.... open it up as text....
there are a couple of options right at the top.....
in the option to set the java dir, set it to wherever yer java is installed ..... keep in mind that it wants the fulll path to the java bin....
same with the azureus dir.....

I cut & pasted this from here:
http://www.murga-linux.com/puppy/viewto ... 42&t=25494
After several hours trying i finally found this post l and it was a lifesaver. (I was about to give up on puppy.)

Thanks for the instructions about how to install java. It made installing java really easy.
:D

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#16 Post by edoc »

Before I do this I feel it is wise for me to ask ...

Is there anything about Seamonkey 1.1.13 (I did the upgrade from the stock 1.1.11) in a Puppy 4.11-Normal ext3 formatted Frugal install on a laptop that might cause these instructions to not apply (or need to be modified), please?

I always seem to have one or more variables unaccounted for which send(s) me off into an open-loop of confusion ... :roll:
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#17 Post by Sit Heel Speak »

Don't follow the above procedure, it is out of date. Instead follow the instructions below.
Last edited by Sit Heel Speak on Wed 11 Feb 2009, 08:02, edited 1 time in total.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#18 Post by Sit Heel Speak »

How to install Java Version 6 Update 11 on Puppy 4.11 for Seamonkey, as of December 18 2008. This also makes JavaScript available to Open Office.

1. Open ROX-Filer, up-arrow, usr, and see if folder /usr/java exists. If it doesn't create it:

Code: Select all

mkdir /usr/java
2. Surf to www.sun.com and click the "Java" icon under the "Downloads" bar. When the "Java" button enlarges click "Download".
This takes me to http://www.java.com/en/download/index.jsp.

3. Click the "Free Java Download" button.

4. In the "Linux (self-extracting file) filesize: 19.23 MB" row, left-click "Linux (self-extracting file)" then "Save it to disk" and save it to /usr/java. On my 512 mbps ADSL connection the download, monitored by Download Manager, takes about 9 minutes.

5. Open in ROX-Filer /usr/java and right-click the icon of jre-6u11-linux-i586.bin, File 'jre-6u11-linux-i586.bin', slide mouse to right onto submenu, left-click on Permissions, left-click Yes to change permissions and make executeable.

6. Right-click-in-whitespace in the /usr/java ROX-Filer window, Window-->Terminal here.
Execute the installer:

Code: Select all

./jre-6u11-linux-i586.bin
7. You will now see the License Agreement. Keep pressing Enter (or R) until you see
Do you agree to the above license terms? [yes or no]
Type "yes" (without quotes) then press Enter.
The binary unpacks to a subdir /usr/java/jre1.6.0_11

8. Issue

Code: Select all

cd /usr/lib/seamonkey/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_11/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
cd /usr/lib/mozilla/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_11/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
cd /root/.mozilla/plugins/java
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_11/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
(actually, I'm not sure if all three of the above are required. Does anyone know which one(s) is/are necessary?)

9. In Seamonkey, Edit-->Preferences-->Advanced (click on the +)-->Scripts and Plugins
Check Enable JavaScript for Navigator and for Mail & Newsgroups,
click Advanced (the word Advanced) and check Enable Java.
Close Seamonkey.
Reboot the computer.

10. Restart Seamonkey.
Surf to www.sun.com, Java under Downloads, "Download", "Do I Have Java?", and you should see the
"Congratulations!
You have the recommended Java installed (Version 6 Update 11)."
notification.

11. Done.
Last edited by Sit Heel Speak on Thu 13 Aug 2009, 08:52, edited 3 times in total.

nayi_mari
Posts: 5
Joined: Mon 09 Feb 2009, 13:56

#19 Post by nayi_mari »

Thanks, SitHeelSpeak, for the very detailed HOWTO for installing Java. Unfortunately, I ran into the following error while executing the installer (step 6):

Code: Select all

 inflating: jre-6u11-linux-i586.rpm  
rpm: invalid option -- v
BusyBox v1.8.2 (2007-11-30 09:20:42 GMT-8) multi-call binary

Usage: rpm -i -q[ildc]p package.rpm

Manipulate RPM packages

Options:
        -i      Install package
        -q      Query package
        -p      Query uninstalled package
        -i      Show information
        -l      List contents
        -d      List documents
        -c      List config files

 
Done.
So a .rpm file is being created, but the -v option is not recognized by puppy's 'rpm' command. I suing the rpm command manually, but had the following error:

Code: Select all

sh-3.00# mkdir /usr/java
sh-3.00# rpm -i jre-6u11-linux-i586.rpm 
rpm: cannot make dir ./etc: File exists
rpm: cannot make dir ./etc/.java: File exists
rpm: cannot make dir ./etc/.java/.systemPrefs: File exists
rpm: cannot make dir ./usr: File exists
rpm: cannot make dir ./usr/java: File exists
95127 blocks
sh-3.00# /usr/java/jre1.6.0_11/bin/java
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
so there's something going wrong with the installation. Could the problem be with Puppy's rpm command? I would appreciate any help in this regard, since Java is very important for me.
Cheers,
NM

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#20 Post by Sit Heel Speak »

nayi_mari wrote:inflating: jre-6u11-linux-i586.rpm
You don't want the 18.6 MB .rpm file, instead you want the 19.23 MB self-extracting (.bin) file immediately underneath the .rpm file. I erroneously wrote it was 19.18 MB in my instructions above. Corrected.

Post Reply