DIY - How to Install Java

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

DIY - How to Install Java

#1 Post by playdayz »

Java always seemed mysterious and frustrating to me, but no longer, probably because I have made so many mistakes at it. I just installed it without any script, pet, or sfs and if I can do it, then anyone can do it.

1. Download java from java.com. I prefer to download it to /mnt/home to conserve my ram. If you want the latest revision you can just click the big download button, and then select the “Linux (self-extracting file)
Last edited by playdayz on Mon 17 Aug 2009, 17:57, edited 8 times in total.

Randy Pete
Posts: 70
Joined: Mon 04 May 2009, 09:56
Location: Sitting at PC

#2 Post by Randy Pete »

Thanks...
very usable post
Will try this one

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Thanks guys have added info here
http://puppylinux.org/wikka/JavaInPuppy
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

mystmaiden
Posts: 93
Joined: Thu 23 Jul 2009, 14:36

#4 Post by mystmaiden »

I tried following the steps here. Downloaded java to mnt then right clicked on the file and chose make it searchable and executable but when I run

Code: Select all

./jre-6u15-linux-i556.bin 
it returns no such file or directory.

Early on before I realized that the desktop here is not an actual place, I removed some icons the wrong way so every time I open rxvt I get

Code: Select all

cat: /usr/bin/defaultdraw: No such file or directory.
There are actually four of those, draw, paint, spreadsheet, wordprocessor. Could that be mucking things up?

myst

edited to add: I see my mistake, I was leaving out the terminal here part. Apologies.

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#5 Post by playdayz »

edited to add: Duh, I guess I should read the whole message ;-)

hi mystmaiden, It sounds like you have not opened the terminal in the directory that contains the jre-6u14-linux-i586.bin. (It will be revision 15 now I think instead of 14.) Open Rox and navigate to the directory that contains ./jre-6u14-linux-i586.bin and then right-click and choose Window -> Terminal Here. You can check if you are in the proper directory by entering "ls" (no quotation marks) which will list the files in the directory that the terminal is open in--and the jre file should show up. If it does then enter the "./jre-6u14-linux-i586.bin" command." Remember to start the command with the ./ (period forward-slash.

If the jre file shows up when you enter "ls" but it still doesn't work, then probably something went wrong with the permissions step--make sure that you right-click the jre file to change the permissions--but I bet it is the first paragraph in this message that will help.

When the file is downloaded open a Rox window and go to the place where you downloaded Java. First, Right-Click the java file and then choose Permissions and Yes to make the file executable. Second, Right-Click -> Window -> Terminal Here.

3. In the terminal enter
Code:
./jre-6u14-linux-i586.bin

(or whatever the name of the java file is). Don't forget the "./" to begin (that is period – forward slash, to indicate that the file is found in the current directory). You will need to scroll down with Enter to accept the license agreement and then the install program will create a folder named "jre1.6.0_14

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

#6 Post by Sit Heel Speak »

If I may be permitted to untangle the shoelaces

From the top:

1. Create new directory /usr/java
2. www.sun.com, Java, Downloads...Download Free Java Download Linux Self Extracting File
3. Save it to disk, save jre-6u15-linux-i586.bin to /usr/java
4. In Rox window of /usr/java right-click jre-6u15-linux-i586.bin's icon, Properties, check to give owner execute permission, close dialogbox
4. In Rox window of /usr/java right-click in whitespace
5. Window --> Terminal here. In terminal window run
6.

Code: Select all

./jre-6u15-linux-i586.bin
7. Press PgDn then R to go straight to bottom of EULA
8 yes {Enter}
9. In same terminal window (ignore error messages) (you can highlight each of these lines then middlemousebutton to paste after # prompt in rxvt window):

Code: Select all

cd /usr/lib/seamonkey/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_15/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
mkdir /usr/lib/mozilla/plugins
cd /usr/lib/mozilla/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_15/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
mkdir /root/.mozilla/plugins
mkdir /root/.mozilla/plugins/java
cd /root/.mozilla/plugins/java
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_15/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
10. 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.

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

12. Done.

Sorry if I'm stepping on anybody's cigarette.

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#7 Post by playdayz »

Thanks SitHeelSpeak, I have incorporated three of your changes.

Press PgDn then R to go straight to bottom of EULA
In Seamonkey, Edit--> Preferences--> Advanced and check Enable Java.
Right-Click on the white space (inside the window)

In my experience instructions are always clearer and more robust when they are edited and tested. I was even thinking about how to propose that the editing happen more often with How To's and other items in the forums. So thanks again. One of my goals is to explain so that people understand what they are doing and deepen their knowledge of Puppy and Linux, rather than just following instructions by rote. Using the command line is pure linux of course, but using Rox is pure Puppy and I find it a great tool to understand the workings of linux from a gui. For those reasons I retained
[quote]Open the folder jre1.6.0_xx/plugin/ i386/ns7/ and drag the libjavaplugin.oji.so to either /usr/lib/mozilla/plugins or /root/.mozilla/plugins and choose “Link (relative).

hasbeen
Posts: 1
Joined: Sun 16 Aug 2009, 12:22

Open Office

#8 Post by hasbeen »

Thanks I found this useful and have been able to get Java to run on SeaMonkey with no problems.

The problems occur with OpenOffice when I go to the jre1.6.0_15 folder and click on select I get a message "The folder you selected does not contain a Java runtime environment. Please select a different folder."

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#9 Post by playdayz »

sorry hasbeen, that is my mistake i think. It is one of the folders inside the jre1.6.0_15 folder. I think it might be the one named i386; i am going to have to check, but i think you could just try each subdirectory until you get the one it wants.

aarf

#10 Post by aarf »

thanks paydayz. :D well written instructions for a useful tool. will give this a shot.

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#11 Post by playdayz »

@hasbeen,

I just did this. Start OpenOffice, any component. Then Tools -> Options -> Java -> Add and navigate to jre1.6.0_15 and Select. By navigate to, I mean open the jre1.6.0_15 folder so that you see the folders bin, javaws, lib, man, plugin. When you see those, then choose Select. It worked and a java was listed in the box. If I tried with a folder that did not contain java then I got the error message about the folder not containing java.

It also seemed that if you put your java into /usr/java, then OpenOffice finds it automatically.

aarf

#12 Post by aarf »

wherever you put jre-6u15-linux-i586.bin,
You will need at least 72212 kBytes of Disk Free

aarf

#13 Post by aarf »

well my extracted folder turned out to be 105MB, so a good thing to keep out of a pup_save. mine is in the /mnt/home section.
installation worked by following the first post.
just two little notes.
Java in Opera. Open Opera and click Tools -> Preferences -> Advanced -> Content. Make sure Enable Java is checked and click Java Options. Click Choose to find the path jre1.6.0_14/lib/i386. Select that and click Validate Java Path.
missed changing one 14 to 15 :) and when you are in this step part in opera :
Make sure Enable Java is checked and click Java Options. Click Choose to find the path jre1.6.0_14/lib/i386
if you navigate away from that "Choose to find path" pop-up without closing it, you will need to Ctrl+alt+BackSpace to restartx to continue. looks like a flaw in opera, my opera10beta2 at least. if you close the popup by selecting an option then there is no issue.

good job playdayz. now i finally will be able to view all those java graphs which have been, and remained hidden from me since stared using puppy. :?
Attachments
java.jpg
(21.84 KiB) Downloaded 5380 times

aarf

#14 Post by aarf »

going to link this automatic java install methodhere so that you know about its existence.

utensil
Posts: 17
Joined: Sat 25 Jul 2009, 22:40

#15 Post by utensil »

How do you run .jar files?

The Java Virtual Machine works fine in windows, but I can't run java executable files in puppy. Do I need a pet for that?

aarf

#16 Post by aarf »

utensil wrote:How do you run .jar files?

The Java Virtual Machine works fine in windows, but I can't run java executable files in puppy. Do I need a pet for that?
perhaps this will help

how i installed free jin online interactive remote players chess i.e. play against other real people not a computer, into puppy4,2.1
have as above java in /mnt/home/home/user/My Documents/puppy/jre1.6.0_15/ i.e. not in the pup_save
download jin chess from http://www.jinchess.com/unix_download, click it and extracted to /mnt/home/home/user/jin-2.14.1/
then dragged and link absolute the file named jin from /mnt/home/home/user/jin-2.14.1/ into directory /root/bin/
then dragged and link absolute the file named java from /mnt/home/home/user/My Documents/puppy/jre1.6.0_15/ into directory /root/bin/
then click on the jin link in directory /root/bin/ and jin chess will start.
then optionally you can drag and drop the jin link from /root/bin/ to the desktop:
tell us if it works for you.
local installed jin install saves waiting for the applet to download every time which is what occurs if you use your java enabled browser to play/connect .

mary john

#17 Post by mary john »

Hey all,
If u want to install Java then u must follow this path
1. Create new directory /usr/java
2. www.sun.com, Java, Downloads...Download Free Java Download Linux Self Extracting File
3. Save it to disk, save jre-6u15-linux-i586.bin to /usr/java
4. In Rox window of /usr/java right-click jre-6u15-linux-i586.bin's icon, Properties, check to give owner execute permission, close dialogbox
4. In Rox window of /usr/java right-click in whitespace
5. Window --> Terminal here. In terminal window run
6. Code:
./jre-6u15-linux-i586.bin


7. Press PgDn then R to go straight to bottom of EULA
8 yes {Enter}
9. In same terminal window (ignore error messages) (you can highlight each of these lines then middlemousebutton to paste after # prompt in rxvt window): Code:
cd /usr/lib/seamonkey/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_15/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
mkdir /usr/lib/mozilla/plugins
cd /usr/lib/mozilla/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_15/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
mkdir /root/.mozilla/plugins
mkdir /root/.mozilla/plugins/java
cd /root/.mozilla/plugins/java
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0_15/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so


10. 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.


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

12. Done.

hey, i hope u don't get any problem after do this coding

User avatar
xman
Posts: 144
Joined: Thu 24 Sep 2009, 06:31

#18 Post by xman »

I have old pc and 4.30-k2.6.25.16 on it. I try new kernel, but puppy was seized with panic at startup. :shock:

At first I have to thank playdayz for Firefox-DIY. I installed your pets, downloaded and zipped old 3.5.2 from mozilla archive, and then updated it online to 3.5.3.

I have used old java-jre-6u14.sfs, but during the last few days I have done some minor experiments using java-jre-6u16. Browsers and atunes are now more stable than ever in my few puppy days. I find this java DIY-install more difficult than to use pet or sfs found from http://koinunoesa.blog46.fc2.com/blog-entry-81.html. Thank You very much, nikukyu. :D

Finally, I tested new java-jre-6u16.pet installation using it briefly with opera 10, firefox 3.5.3, seamonkey 1.1.18, atunes and oxygenoffice. I set atunes to play Frank Zappa's “Penguin in Bondage

User avatar
swiatmar
Posts: 248
Joined: Sat 09 Aug 2008, 19:33
Location: Danube, AT

#19 Post by swiatmar »

Hallo!!
Does anybody knows how to do this in xfce? I don't have rox. How do I change the permission? Until now i get always the massage :permission denied
regards
mar

imnotrich
Posts: 44
Joined: Sat 03 Jun 2006, 03:34
Location: Northern California
Contact:

Update java install instructions for 4.3.1 please

#20 Post by imnotrich »

Followed the step by step instructions to the letter, still no joy.

Also found a script entitled "install java" elsewhere in these forums. Same result.

Java won't run. Java web pages tell me only that "something is wrong" or that my browser does not have Java enabled but I do indeed have Java enabled in Sea Monkey.

I've also tried Firefox 2 (newest firefox is 3.5) which is the only fox in the Puppy repos.

Anybody get this to work yet?

Post Reply