[RC2] Automatic Java (JRE) Install Script

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

[RC2] Automatic Java (JRE) Install Script

#1 Post by Iguleder »

INFO:
It's a simple script that downloads and runs the latest JRE, installs it and creates the right links. Nothing more, nothing less. No error handling or anything like that, it may erase important data, so use at your own risk. It's the first "release candidate", although I'm not "releasing" it, this version works as it should, it also installs the Mozilla browser plugin.

Tested on Firefox 3.5 and Puppy 4.2.1's default SeaMonkey.

It is recommended that you install to a partition (some /mnt, /mnt/home for instance), and NOT to your home folder.

- Make sure you don't have any files/folders named jre* or javainstaller.bin in the script's folder.
- You need lots of free space and RAM for Java applications. Not for very old PCs.
- You need a fast internet connection, it's a 20 MB download, and Sun's servers are not so fast (80-85 Kbps on my fast connection).

After installing Java, go to http://www.javatester.org/version.html to see if Java is installed correctly.

HOW TO USE IT:
If you saved it in /root: go to the console, run sh installjava.
If you saved in another directory (/x/y/z), run cd /x/y/z, then sh installjava.

It does everything for you, you just need to specify the installation location, scroll down using ENTER and accept the license by typing "yes".

DOWNLOAD

(btw, Puppy SHOULD include something similar, but that's just my opinion)
Last edited by Iguleder on Tue 18 Aug 2009, 15:19, edited 4 times in total.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#2 Post by Béèm »

Does the script also create the JAVA_HOME variable?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

aarf

#3 Post by aarf »

Flashplayer is waiting for you when you're ready.

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

#4 Post by Lobster »

Many thanks for trying to get this going :)
After installing Java, run "java --version" in the console to see if Java is installed correctly
This command should be java -version
In the browser goto edit / Preferences / Advanced
and enable the java option

I did that but this test
http://www.javatester.org/version.html
gave me
Browser has Java disabled

so maybe JAVA_HOME variable or something else required?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#5 Post by Iguleder »

Well ... you're right. I haven't checked the browser, because manual installation on other Linuxes didn't require any variables.

I'm currently rewriting the script ... I think I found the problem.

EDIT: updated the topic, now it works perfectly.

aarf

#6 Post by aarf »

there are issues with having the 100MB odd java folder in the pupsave. it is possible and desirable to have the big folder outside so that it doesn't slow loading and exit times every time. see
http://www.murga-linux.com/puppy/viewto ... 51c6ed2905.
i personally would use the manual install there unless you can duplicate it into automatic.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#7 Post by Iguleder »

I updated the script again, now it installs to /root ... should I change it to /mnt/home? Some users don't have /mnt/home (for example, users who boot from a CD).

EDIT: now it asks for the installation folder.

aarf

#8 Post by aarf »

Iguleder wrote:I updated the script again, now it installs to /root ... should I change it to /mnt/home? Some users don't have /mnt/home (for example, users who boot from a CD).

EDIT: now it asks for the installation folder.
perhaps a selection process with a list of default locations. if you are to accommodate CD, frugal, and harddrive installs it makes it tricker. i only use frugal and so it is pup_saves that i know about. perhaps you will need feedback for/from the other user options.

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

#9 Post by Lobster »

Some users don't have /mnt/home (for example, users who boot from a CD)
I do that and I have that directory

I also now have java thanks to you :)
running in beta 1 Puppy 4.3
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

aarf

#10 Post by aarf »

suggested improvement: making it more truly the latest available download with no additional future tweaking needed by using some sort of file handler that can pull the link from the webpage at the http://javadl.sun.com site. i know iit is possible to pull links out of web pages using php but i dont know if it is possible in/with the scripts you are using. so perhaps some intermediate http://elsewhere.com/webpage.php that gives the raw link maybe necessary. i can look into that part if you are unfamiliar with php or if it is not possible in your scripts.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#11 Post by Iguleder »

aarf wrote: perhaps a selection process with a list of default locations.
I think it would be best to add a list of locations, as you said, with notes about each one, for example: "/mnt /home - best choice for frugal installations", "/usr/lib - best choice for full installations" and "/root - best choice for live sessions".
aarf wrote:suggested improvement: making it more truly the latest available download
Here's the latest Java .bin download URL:
http://javadl.sun.com/webapps/download/ ... leId=33223

I guess it remains the same with each new version, since each JRE bundle has a different ID.

aarf

#12 Post by aarf »

test your Java install at this free chess site

Post Reply