[RC2] Automatic Java (JRE) Install Script
- Iguleder
- Posts: 2026
- Joined: Tue 11 Aug 2009, 09:36
- Location: Israel, somewhere in the beautiful desert
- Contact:
[RC2] Automatic Java (JRE) Install Script
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)
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]
[url=https://github.com/dimkr]My GitHub profile[/url]
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Many thanks for trying to get this going
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?
This command should be java -versionAfter installing Java, run "java --version" in the console to see if Java is installed correctly
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?
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.
http://www.murga-linux.com/puppy/viewto ... 51c6ed2905.
i personally would use the manual install there unless you can duplicate it into automatic.
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.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.
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.
- Iguleder
- Posts: 2026
- Joined: Tue 11 Aug 2009, 09:36
- Location: Israel, somewhere in the beautiful desert
- Contact:
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: perhaps a selection process with a list of default locations.
Here's the latest Java .bin download URL:aarf wrote:suggested improvement: making it more truly the latest available download
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.