Attached is the result of my combining parts of 01micko's get_libreoffice and and uten's sfs-java.sh scripts to form get_java. The former set provides the RAM/HD requirement determination and the sfs load part. Uten's is everything else except my user input function.
The package also includes a profile code file and initialization script intended to become part of puppy and independent of the SFS files, which need contain only the Oracle JRE components. Those scripts also support JDK SFS files, although get_java itself does not currently build them. They also support JRE SFS packages created my other means, including shinobar's and OscarTalks' SFS files and those built from uten's sfs-java.sh. The profile code detects the jre1... directory if present in /opt, /usr/java, /usr/local or /usr/local/java. (Those are the places I am aware of, although I can add more if there are any.) Although the scripts will override any in an SFS file, JRE pet installations containing their own profile or init script may interfere with them -- unless they are installed before installing get_java.
The user is given the options of downloading either the 32-bit or 64-bit version of the latest JRE, as well as building from already downloaded archive (tarball) files. Get_java looks for those files in /tmp, /root and /mnt/home, up to one subdirectory level deep.
Once the SFS file is built, the option of loading it immediately is offered. If the file is loaded, the supporting linkages are put in place, making the new JRE ready for use immediately. Otherwise, the links are added at the bootup following loading by the BootManager or sfs_load.
Feedback very welcome.
Richard
EDIT: I replaced the package after the first download, to add the automatic link installation and remove an extra file. Also added detection of Barry's jdk location.
Java JDK and JRE
get_java - Jave JRE downloader, SFS file maker and loader!
- Attachments
-
- get_java-20150817-beta.pet
- Java JRE downloader, SFS builder and loader
Puppy JRE automatic setup - (13.56 KiB) Downloaded 279 times
Last edited by rerwin on Mon 17 Aug 2015, 19:56, edited 2 times in total.
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Hi, in Appril (Quirky), I placed the JDK at /opt/jdk. It is the whole thing, as downloaded from Oracle, just copied as-is to /opt/jdk.
Quirky does not use SFSs, so it is a PET package.
I'm away from home right now, so can't check, but in the PET I did set a couple of environment variables in /etc/profile.d/jdk, I think one was JAVA_HOME.
Um, will have to check, but think also added to the PATH variable, so bin/java is in the path.
Quirky does not use SFSs, so it is a PET package.
I'm away from home right now, so can't check, but in the PET I did set a couple of environment variables in /etc/profile.d/jdk, I think one was JAVA_HOME.
Um, will have to check, but think also added to the PATH variable, so bin/java is in the path.
[url]https://bkhome.org/news/[/url]