Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 14 Dec 2019, 07:56
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
DIY - How to Install Java
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [43 Posts]   Goto page: 1, 2, 3 Next
Author Message
playdayz


Joined: 25 Apr 2008
Posts: 3794

PostPosted: Tue 04 Aug 2009, 23:28    Post subject:  DIY - How to Install Java
Subject description: No need for scripts or pets
 

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)” not the one with rpm in the filename. If you want an earlier version then click “Other Java Versions” and then “Archive Java Technology Products Download” under Older Versions. (One of my work sites, for instance, works best, or at all, only with 6 update 7.)

2. When the file is downloaded open a Rox window and go to the directory where you downloaded Java. First, Right-Click the jre-6uxx-linux-i586.bin file and then choose Permissions and Yes to make the file executable. Second, Right-Click on the white space (inside the window) -> 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.

3. In the terminal enter
Code:
./jre-6u15-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). Press PgDn then R to go straight to bottom of EULA and enter "yes" to accept the license agreement and then the install program will create a folder named "jre1.6.0_15” or something like that.

4. Take that folder and put it in /usr/lib or in /usr or in /opt, etc. I am not sure there is a best place for it. I actually leave it right there in /mnt/home (the advantage of /mnt/home is that it does not use up the pupsave memory).

5. Open the folder jre1.6.0_14/plugin/ i386/ns7/ and drag the libjavaplugin.oji to either /usr/lib/mozilla/plugins or /root/.mozilla/plugins and choose “Link (relative).” In Seamonkey, Edit--> Preferences--> Advanced and check Enable Java. To check, open Seamonkey and then Help -> About Plugins to see java there. In Firefox, Click Tools -> Addons -> Plugins and see a java plugin there. Go to java.com and click Do I Have Java?

7. If you want to use java in OpenOffice, then start OpenOffice and click Tools -> Options -> Java -> Add and then navigate to open the jre1.6.0_15 folder. When you open the folder you will see the folders bin, javaws, lib, man, plugin, so when you see those folders, choose Select. Also, if you place your java in /usr/java, then OpenOffice finds it automatically. Also click Enable Java. I was using OpenOffice 3.1.

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_15/lib/i386. Select that and click Validate Java Path. (aarf says: 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.)

Enjoy Java, and be ready and able to do it yourself.

Last edited by playdayz on Mon 17 Aug 2009, 13:57; edited 8 times in total
Back to top
View user's profile Send private message 
Randy Pete

Joined: 04 May 2009
Posts: 70
Location: Sitting at PC

PostPosted: Tue 11 Aug 2009, 14:24    Post subject:  

Thanks...
very usable post
Will try this one
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15556
Location: Paradox Realm

PostPosted: Tue 11 Aug 2009, 23:05    Post subject:  

Thanks guys have added info here
http://puppylinux.org/wikka/JavaInPuppy

_________________
Puppy on Raspberry Pi Release Candidate Cool
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html Very Happy
Back to top
View user's profile Send private message Visit poster's website 
mystmaiden

Joined: 23 Jul 2009
Posts: 93

PostPosted: Wed 12 Aug 2009, 02:45    Post subject:  

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:
./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:
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.
Back to top
View user's profile Send private message 
playdayz


Joined: 25 Apr 2008
Posts: 3794

PostPosted: Wed 12 Aug 2009, 12:24    Post subject:  

edited to add: Duh, I guess I should read the whole message Wink

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” or something like that.
Back to top
View user's profile Send private message 
Sit Heel Speak


Joined: 30 Mar 2006
Posts: 2595
Location: downwind

PostPosted: Thu 13 Aug 2009, 04:46    Post subject:  

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:
./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.

Sorry if I'm stepping on anybody's cigarette.
Back to top
View user's profile Send private message 
playdayz


Joined: 25 Apr 2008
Posts: 3794

PostPosted: Thu 13 Aug 2009, 11:22    Post subject:  

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).”

Rather than using
Quote:
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
Back to top
View user's profile Send private message 
hasbeen

Joined: 16 Aug 2009
Posts: 1

PostPosted: Sun 16 Aug 2009, 17:39    Post subject: Open Office  

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."
Back to top
View user's profile Send private message 
playdayz


Joined: 25 Apr 2008
Posts: 3794

PostPosted: Sun 16 Aug 2009, 18:13    Post subject:  

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.
Back to top
View user's profile Send private message 
aarf

Joined: 30 Aug 2007
Posts: 3613
Location: around the bend

PostPosted: Sun 16 Aug 2009, 19:37    Post subject:  

thanks paydayz. Very Happy well written instructions for a useful tool. will give this a shot.
_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
playdayz


Joined: 25 Apr 2008
Posts: 3794

PostPosted: Sun 16 Aug 2009, 21:43    Post subject:  

@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.
Back to top
View user's profile Send private message 
aarf

Joined: 30 Aug 2007
Posts: 3613
Location: around the bend

PostPosted: Mon 17 Aug 2009, 07:43    Post subject:  

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

_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
aarf

Joined: 30 Aug 2007
Posts: 3613
Location: around the bend

PostPosted: Mon 17 Aug 2009, 12:31    Post subject:  

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.
Quote:
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 Smile and when you are in this step part in opera :
Quote:
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. Confused
java.jpg
 Description   
 Filesize   21.84 KB
 Viewed   5359 Time(s)

java.jpg


_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
aarf

Joined: 30 Aug 2007
Posts: 3613
Location: around the bend

PostPosted: Tue 18 Aug 2009, 11:49    Post subject:  

going to link this automatic java install method here so that you know about its existence.
_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
utensil

Joined: 25 Jul 2009
Posts: 17

PostPosted: Wed 19 Aug 2009, 22:12    Post subject:  

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?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [43 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1462s ][ Queries: 12 (0.0284s) ][ GZIP on ]