get_java-1.1 - April 30, 2018
get_java-1.1 - April 30, 2018
The get_java tool is provided to allow users to easily install Java updates without waiting for someone to create a new PET or squash file of them.
It obtains, builds and installs/loads the Java Runtime Environment (JRE) or the Java Development Kit (JDK), 32- or 64-bit versions, as SFS or PET packages. After installation, Java support is available immediately, without a reboot. The tool and interface are designed to work in any puppy or deriviative.
Besides downloading a Java archive (tarball), get_java can build from an already downloaded archive. Either way, it places the PET packages in /opt/jre or /opt/jdk and the SFS files in /opt/jre-(version) or /opt/jdk-(version)
The automatic interface will find the latest version of Java if multiple versions are installed. If the latest version is installed as both a PET and SFS file, the PET version will be chosen. It will also detect if Java is not installed. Although the Java Control Center will always appear in the Utility menu, selecting it will pop up a message window if Java is not present.
The interface components are intended to become part of Puppy, so that Java package providers need not include setup logic (of which there are several methods). The interface overrides such logic in existing packages. It searches for packages in all of the (known) commonly used locations.
The attached packages were developed and tested in lupusuper2 and also briefly tested in lucid-5.2.8.7, precise, slacko, tahrpup, appril, werewolf64, fatdog64, slacko64 and tahr64. Please try them in other Puppies and report any issues to me here or by PM.
Richard
UPDATE: After javaif download number 145, I uploaded the version that I have submitted to woof-CE. The only difference from previously is the correction of a test for an action by another Java SFS package that modifies environment variables. If you cannot use such a package on the first attempt, the problem should resolve itself upon the next boot-up. The fix prevents the problem on the first use of a newly installed Java SFS package (other than one produced by get_java). So, there is no need for most users to replace the javaif package they have.
Another UPDATE: After javaif download number 147, I updated the version that I have submitted to woof-CE. The change is to the Java Control Panel menu definition, to avoid possible duplicate menu entries for it.
UPDATE 8/20/16: Uploaded get_java version 1.0.1 after download number 203, as well as a patch package for version 1.0, to restore access to the JDK/JRE downloads.
UPDATE 4/30/18: Uploaded get_java version 1.1 to accommodate increased complexity of version selection -- x64 using version 10.0.1 and x32 using 8u172.
It obtains, builds and installs/loads the Java Runtime Environment (JRE) or the Java Development Kit (JDK), 32- or 64-bit versions, as SFS or PET packages. After installation, Java support is available immediately, without a reboot. The tool and interface are designed to work in any puppy or deriviative.
Besides downloading a Java archive (tarball), get_java can build from an already downloaded archive. Either way, it places the PET packages in /opt/jre or /opt/jdk and the SFS files in /opt/jre-(version) or /opt/jdk-(version)
The automatic interface will find the latest version of Java if multiple versions are installed. If the latest version is installed as both a PET and SFS file, the PET version will be chosen. It will also detect if Java is not installed. Although the Java Control Center will always appear in the Utility menu, selecting it will pop up a message window if Java is not present.
The interface components are intended to become part of Puppy, so that Java package providers need not include setup logic (of which there are several methods). The interface overrides such logic in existing packages. It searches for packages in all of the (known) commonly used locations.
The attached packages were developed and tested in lupusuper2 and also briefly tested in lucid-5.2.8.7, precise, slacko, tahrpup, appril, werewolf64, fatdog64, slacko64 and tahr64. Please try them in other Puppies and report any issues to me here or by PM.
Richard
UPDATE: After javaif download number 145, I uploaded the version that I have submitted to woof-CE. The only difference from previously is the correction of a test for an action by another Java SFS package that modifies environment variables. If you cannot use such a package on the first attempt, the problem should resolve itself upon the next boot-up. The fix prevents the problem on the first use of a newly installed Java SFS package (other than one produced by get_java). So, there is no need for most users to replace the javaif package they have.
Another UPDATE: After javaif download number 147, I updated the version that I have submitted to woof-CE. The change is to the Java Control Panel menu definition, to avoid possible duplicate menu entries for it.
UPDATE 8/20/16: Uploaded get_java version 1.0.1 after download number 203, as well as a patch package for version 1.0, to restore access to the JDK/JRE downloads.
UPDATE 4/30/18: Uploaded get_java version 1.1 to accommodate increased complexity of version selection -- x64 using version 10.0.1 and x32 using 8u172.
- Attachments
-
- get_java-1.1.pet
- Updated script & configuration file, to match changes in Oracle URLs, for separate
64- & 32-bit releases and alternative versions. - (11.57 KiB) Downloaded 1006 times
-
- get_java.conf-patch-20160820.pet
- Updated configuration file, to match changes in Oracle URLs
For get_java-1.0 only - already in version 1.0.1 - (994 Bytes) Downloaded 879 times
-
- javaif-20160616.pet
- Automatic Java interface components, necessary to run packages created by
get_java-1.x -- as submitted to woof-CE.
Must be installed before installing get_java package (to provide icon for it).
Intended for inclusion in all puppies, to work with all Java - (11.27 KiB) Downloaded 1332 times
-
- get_java-1.0.1.pet
- All-in-one Java downloader/builder/installer (d/l from oracle.com) --
as submitted to woof-CE
Install only after javaif package is installed, to get the intended menu icon.
Can be installed and used without javaif, to create packages to be used
elsewhere. - (11.49 KiB) Downloaded 1289 times
Last edited by rerwin on Mon 30 Apr 2018, 15:12, edited 22 times in total.
More Details
EDIT: No longer true -- disregard:
Note also that the get_java dialog is optimized to download, build and install the newest version of Java Runtime (JRE) for the running 32/64-bit puppy, if the user selects 'OK' and 'Yes' to the popups.
Note that support for all puppy derivatives is incomplete and may require assistance from the developers of the derivatives. Although these packages work with fatdog64, they require manual package installation using the fatdog tools; for automated installation, I will need help from the developer.Now that I have added this topic, I see that the download does nt detect the actual current version available. Until I can sort that out, please download the recommended version from the Oracle Java site:
http://www.java.com/en/download/linux_manual.jsp
and then use the "archive file" alternative in get_java (No, to "download?").
Note also that the get_java dialog is optimized to download, build and install the newest version of Java Runtime (JRE) for the running 32/64-bit puppy, if the user selects 'OK' and 'Yes' to the popups.
Last edited by rerwin on Sat 09 Jan 2016, 21:59, edited 2 times in total.
Re: More Details
Hi rerwin,rerwin wrote:Alert!
Now that I have added this topic, I see that the download does nt detect the actual current version available. Until I can sort that out, please download the recommended version from the Oracle Java site:
http://www.java.com/en/download/linux_manual.jsp
and then use the "archive file" alternative in get_java (No, to "download?").
Note that support for all puppy derivatives is incomplete and may require assistance from the developers of the derivatives. Although these packages work with fatdog64, they require manual package installation using the fatdog tools; for automated installation, I will need help from the developer.
Note also that the get_java dialog is optimized to download, build and install the newest version of Java Runtime (JRE) for the running 32/64-bit puppy, if the user selects 'OK' and 'Yes' to the popups.
Have a look at
http://murga-linux.com/puppy/viewtopic. ... 254#871254
It's how I handle jre and as long as youve setup first time properly works ok for upgrades.
regards
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: get_java-0.1-beta - November 9, 2015
Tried them in Fatdog64-701:rerwin wrote:The attached packages were developed and tested in lupusuper2 and also briefly tested in lucid-5.2.8.7, slacko, tahrpup, appril, april and fatdog64. Please try them in other Puppies and report any issues to me here or by PM.
Richard
Code: Select all
# LANGUAGE=en get_java
/usr/sbin/get_java: line 123: Available
2912
1849
1967
0
0
2912
2912
1971
1970
0
0
0-100: syntax error in expression (error token is "2912
1849
1967
0
0
2912
2912
1971
1970
0
0
0-100")
#
If I replace
Code: Select all
SPACEAVAILABLE=$(($SPACEAVAILABLE-$LEAVESPACEMB))
Code: Select all
SPACEAVAILABLE=$(echo $SPACEAVAILABLE - $LEAVESPACEMB | bc)
Code: Select all
# LANGUAGE=en get_java
(standard_in) 1: syntax error
/usr/sbin/get_java: line 134: [: -gt: unary operator expected
/usr/sbin/get_java: line 136: [: -gt: unary operator expected
yaf-splash: no process found
/usr/sbin/get_java: line 186: [: missing `]'
#
replace [] by [[]]
and insert a space before ]
- Attachments
-
- get_java.png
- (22.61 KiB) Downloaded 3693 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: get_java-0.1-beta - November 9, 2015
Got it!L18L wrote:Any clue?
No bc required
SPACEAVAILABLE is NOT a single value
Code: Select all
# get_java
SPACEAVAILABLE=Verfügbar 2911 1849 1967 0 0 2911 2911 1971 1970 0 0 0
SPACEAVAILABLE=2811
#
Code: Select all
case $PUPMODE in #home partition or tempfs space
6|12) SPACEAVAILABLE="$(df -m | grep -w "${HOMESAVE}" | awk '{print $4}')" ;;
#>
2|5) SPACEAVAILABLE=$(df -m / | head -n 2 | tail -n 1 | awk '{print $4}') ;;
*) SPACEAVAILABLE=$LEAVESPACEMB ;;
esac
echo SPACEAVAILABLE=$SPACEAVAILABLE
SPACEAVAILABLE=$(echo $SPACEAVAILABLE | cut -d" " -f2)
SPACEAVAILABLE=$(($SPACEAVAILABLE-$LEAVESPACEMB))
#>
echo SPACEAVAILABLE=$SPACEAVAILABLE
if [ $PUPMODE -eq 5 ]; then
EDIT
Thus just insert
Code: Select all
SPACEAVAILABLE=$(echo $SPACEAVAILABLE | cut -d" " -f2)
Code: Select all
SPACEAVAILABLE=$(($SPACEAVAILABLE-$LEAVESPACEMB))
scsijon, L18L, gcmartin (via PM),
Thank you for trying this get_java and for reporting the problems. I have fixed the fatdog64 issue, which was due to a last-minute change that I failed to verify with fatdog -- PUPSAVE is null in fatdog even for its pupmode 12. Now I test for that and set the correct values for fatdog. The fix is in get_java-0.2, just now uploaded.
The "current version" issue will take awhile to correct. Although I mainly used code from uten's sfs-java.sh package, I substituted jamesbond's download logic. I plan to replace that with uten's simpler logic, integrated into the dialog structure.
Gcmartin pointed me to postings related to this project; one of them I had not seen. It points out residual files that need to be removed to avoid conflict with newer versions of JRE. Although I think I have addressed most of them already, I will review that subject after fixing the download problem.
Thank you for trying this get_java and for reporting the problems. I have fixed the fatdog64 issue, which was due to a last-minute change that I failed to verify with fatdog -- PUPSAVE is null in fatdog even for its pupmode 12. Now I test for that and set the correct values for fatdog. The fix is in get_java-0.2, just now uploaded.
The "current version" issue will take awhile to correct. Although I mainly used code from uten's sfs-java.sh package, I substituted jamesbond's download logic. I plan to replace that with uten's simpler logic, integrated into the dialog structure.
Gcmartin pointed me to postings related to this project; one of them I had not seen. It points out residual files that need to be removed to avoid conflict with newer versions of JRE. Although I think I have addressed most of them already, I will review that subject after fixing the download problem.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
get_java-0.2-beta
my console wrote:# get_java
JAVA_DOWNLOAD_PATH:= /aufs/devsave
JAVA_DOWNLOAD_HOME_PATH:= /mnt/home
JAVA_ARCHIVE_PATH:= /mnt/home/
EXPAND_BASE_PATH:= /tmp/get_java
EXPAND_PATH:=
TARGET_PATH:= /aufs/devsave
JAVA_VERSION:=
JAVA_ARCH:= x64
JAVA_ARCHIVE_FILE_NAME:=
/usr/sbin/get_java: Zeile 397: 2935 Beendet Xdialog --title "$LONG_TITLE" --backtitle "\n$(eval_gettext "Searching for the archive file for \$JAVA_PACKAGE_NAME version \$JAVA_VERSION.")" --no-buttons --ignore-eof --wrap --left --infobox "\n$(gettext 'This window will disappear when the search completes.\nPlease wait...')\n" 0 0 0
/usr/sbin/get_java: Zeile 342: 2935 Beendet Xdialog --title "$LONG_TITLE" --backtitle "\n$(eval_gettext "Searching for the archive file for \$JAVA_PACKAGE_NAME version \$JAVA_VERSION.")" --no-buttons --ignore-eof --wrap --left --infobox "\n$(gettext 'This window will disappear when the search completes.\nPlease wait...')\n" 0 0 0
ERR (717) err:=99, java_unpack_java failed :: [main] [/usr/sbin/get_java]
----------------------------------------------------------------
JAVA_DOWNLOAD_PATH:= /aufs/devsave
JAVA_DOWNLOAD_HOME_PATH:= /mnt/home
JAVA_ARCHIVE_PATH:= /mnt/home/
EXPAND_BASE_PATH:= /tmp/get_java
EXPAND_PATH:=
TARGET_PATH:= /aufs/devsave
JAVA_VERSION:= 8u51
JAVA_ARCH:= x64
JAVA_ARCHIVE_FILE_NAME:= jre-8u51-linux-x64.tar.gz
----------------------------------------------------------------
terminating due to error 99
#
L18L,
Thanks for that report. That problem was with another fix I put in but did not fix the "X64" case. I corrected package 0.2 and re-uploaded it, since you are apparently the only one who downloaded it.
This time, I ran get_java to build an SFS file and then load the file. That seems to work. I include in the javaif package, a test case that includes a "Hello World" application. To run it, just enter:
javaiftest
in a console window. You should see in that window:
Thanks for that report. That problem was with another fix I put in but did not fix the "X64" case. I corrected package 0.2 and re-uploaded it, since you are apparently the only one who downloaded it.
This time, I ran get_java to build an SFS file and then load the file. That seems to work. I include in the javaif package, a test case that includes a "Hello World" application. To run it, just enter:
javaiftest
in a console window. You should see in that window:
- Before installation:
JAVA_HOME=
JRE_HOME=
which java:
/usr/local/bin/java
java -version:
JAVAHOME=/opt/jre-1.8.0_51
JREHOME=/opt/jre-1.8.0_51
JAVAVERSION=1.8.0_51
java HelloWorldApp (expect Hello World!):
Hello World!
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
get_java-0.2-beta
I ran get_java to build an SFS file and then load the file.
Thank you.
Code: Select all
# javaiftest
Before installation:
JAVA_HOME=
JRE_HOME=
which java:
/usr/local/bin/java
java -version:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
JAVAHOME=/opt/jre-1.8.0_51
JREHOME=/opt/jre-1.8.0_51
JAVAVERSION=1.8.0_51
java HelloWorldApp (expect Hello World!):
Hello World!
#
I uploaded get_java-0.2 yet again, after download number 3. The only noticeable difference from before is that the "choose package type" (SFS of PET) dialog is not excessively wide.
I re-uploaded because I expect 0.2 to be the last version to use the current method of downloading JRE and JDK. I want to include L18L's improvements to the internationalization aspect, in case a way is found to fix the download technique, so it would find the real latest version of Java. The replacement technique supports only JRE, meaning that those needing JDK will need to download it separately, then use get_java to create and install the SFS/PET package.
If 0.2 has already been copied to a "mirror" site, I recommend replacing it with this newer copy for the long term. There is no functional difference with this version, other than the single window width change.
Richard
I re-uploaded because I expect 0.2 to be the last version to use the current method of downloading JRE and JDK. I want to include L18L's improvements to the internationalization aspect, in case a way is found to fix the download technique, so it would find the real latest version of Java. The replacement technique supports only JRE, meaning that those needing JDK will need to download it separately, then use get_java to create and install the SFS/PET package.
If 0.2 has already been copied to a "mirror" site, I recommend replacing it with this newer copy for the long term. There is no functional difference with this version, other than the single window width change.
Richard
Version 0.3 uploaded
I have uploaded version 0.3 to correct the issue of downloading the actual latest version of JRE. It uses Uten's method of finding the archive file from javadl.sun.com, but is limited to only JRE. However, I am working on a version that will include JDK and use the oracle.com starting point.
I also made the window sizing more consistent, setting the width to "70" for nearly all windows and relying on wrapping to contain variations in text length due to translations.
I also made the window sizing more consistent, setting the width to "70" for nearly all windows and relying on wrapping to contain variations in text length due to translations.
Hi Richard,
I'm running slacko64 but the test detected I had a 32 bit OS.
Here's why..
I see you are grepping for '64$'. Usually DISTRO_NAME has 'Puppy' appended but for some reason 666philb decided to go with his distro name as Tahrpup64.
A good solution is to go with DISTRO_FILE_PREFIX where slacko and tahr are consistent. Ie: slacko64 and tahr64 are the respective DISTRO_FILE_PREFIX 'es (or perhaps just drop the trailing '$').
EDIT1: I notice that you are setting 'LIBDIR=lib64'. That's fine for slacko and fatdog but can bork tahr64 as libdir for tahr is just 'lib', which is a symlink to /lib/x86_64-linux-gnu
EDIT2: there is a stray escape on line 697. The syntax highlighting in geany shows it almost immediately.
I'm running slacko64 but the test detected I had a 32 bit OS.
Here's why..
Code: Select all
# . /etc/DISTRO_SPECS
# echo $DISTRO_NAME
Slacko64 Puppy
A good solution is to go with DISTRO_FILE_PREFIX where slacko and tahr are consistent. Ie: slacko64 and tahr64 are the respective DISTRO_FILE_PREFIX 'es (or perhaps just drop the trailing '$').
EDIT1: I notice that you are setting 'LIBDIR=lib64'. That's fine for slacko and fatdog but can bork tahr64 as libdir for tahr is just 'lib', which is a symlink to /lib/x86_64-linux-gnu
EDIT2: there is a stray escape on line 697. The syntax highlighting in geany shows it almost immediately.
Puppy Linux Blog - contact me for access
01micko,
Thanks for reporting those mistakes.
1 .I changed the test to:
2. I removed the LIBDIR setting altogether, since it is not used anywhere. Not sure where I got the idea it was needed.
3 .I removed the \ before the $ before the last eval_gettext in line 697 to make it:
Re-uploaded 0.3 after download number 4.
Thanks for reporting those mistakes.
1 .I changed the test to:
Code: Select all
if echo $DISTRO_NAME | grep -q '64[ $]'
3 .I removed the \ before the $ before the last eval_gettext in line 697 to make it:
Code: Select all
\n\n$(eval_gettext
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
get_java-0.3-beta - November 15, 2015
Re-downloaded 0.3 as number 12.
German translation for a get_java-NLS.pet attached.
Suggest you call for other translations in Forum index » Advanced Topics » Puppy Projects » Localization Project
Note,
don't care about "Fatdog" in the package name.
It was done in Fatdog thus Fatdog in the name.
(Fatdog has getjava,sh)
EDIT
BTW there is a thread about it.
It can be installed frugally, no need for java.
German translation for a get_java-NLS.pet attached.
Suggest you call for other translations in Forum index » Advanced Topics » Puppy Projects » Localization Project
Note,
don't care about "Fatdog" in the package name.
It was done in Fatdog thus Fatdog in the name.
(Fatdog has getjava,sh)
EDIT
Why emulate, there is http://www.android-x86.org/I have seen that Skydog007 wrote:I am trying to make a package that will download the android emulator for puppy linux. One of the requirements is JDK 7+. May i use your .pet in my script?
BTW there is a thread about it.
It can be installed frugally, no need for java.
- Attachments
-
- MoManager-de-FATDOG.tar.gz
- containing German translation file
/usr/share/locale/de/LC_MESSAGES/get_java.mo - (5.15 KiB) Downloaded 740 times
Last edited by L18L on Fri 20 Nov 2015, 08:44, edited 1 time in total.
Packaging question
I am trying to make a package that will download the android emulator for puppy linux. One of the requirements is JDK 7+. May i use your .pet in my script?
get-java-0.4-beta uploaded
I have upgraded get_java to its final configuration and released it for testing. Its main improvements are:
I intend that 0.4 will become 1.0 after any newly found bugs are fixed. Please post/PM any issues you might have with this version. Everything should be intuitive or self explanatory. Please help me make it so.
Thanks for all of your help in testing this project.
Richard
- - Downloads either Java Runtime or Java Development Kit.
- Functions in pupmode 5, new bootup from CD.
- "Magic" editing scripts moved to configuration file for maintenance when web pages are modified.
I intend that 0.4 will become 1.0 after any newly found bugs are fixed. Please post/PM any issues you might have with this version. Everything should be intuitive or self explanatory. Please help me make it so.
Thanks for all of your help in testing this project.
Richard
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
get_java-0.4-beta - December 2, 2015
Updated German translation attached.
- Attachments
-
- get_java_de.tar.gz
- (6.01 KiB) Downloaded 612 times
get-java-0.5-rc and updated javaif uploaded
I have further upgraded both get_java and javaif to new final configurations and released them as release candidates. Their main improvements are:
I now intend that version 0.5 will become 1.0, but with any further fixes needed.
Note that get_java works on both 32-bit and 64-bit puppy installations and can produce packages for either architecture and will not offer to install an inappropriate package.
As to get_java in FatDog64, it produces the SFS and PET files, but they cannot be installed automatically due its different package and SFS loading functions. Furthermore, when I tried converting the PET file to the fatdog structure, the converted file failed to install. I could not find any diagnostic information, so could not pursue the issue further.
As before, please report anything that does not seem right with get_java or the Java interface (javaif) package.
Richard
- - Added support for flash drive installations (pupmodes 3,7,13)
- SFS file compression (gz/xz) and naming similar to that of get_libreoffice
- Dialog text clarifications (Thanks, L18L)
- Interface improvement for SFS packages with conflicting profiles
I now intend that version 0.5 will become 1.0, but with any further fixes needed.
Note that get_java works on both 32-bit and 64-bit puppy installations and can produce packages for either architecture and will not offer to install an inappropriate package.
As to get_java in FatDog64, it produces the SFS and PET files, but they cannot be installed automatically due its different package and SFS loading functions. Furthermore, when I tried converting the PET file to the fatdog structure, the converted file failed to install. I could not find any diagnostic information, so could not pursue the issue further.
As before, please report anything that does not seem right with get_java or the Java interface (javaif) package.
Richard
Last edited by rerwin on Sun 27 Dec 2015, 18:51, edited 1 time in total.
get_java-1.0 released! Done!
I have replaced the release candidates with the actual releases, although the contents are identical to the candidates. I simply renamed the directories and rebuilt them without any changes.
Thank you, all, for working with me on this project, which is now complete, unless bugs are found and reported.
Richard
Thank you, all, for working with me on this project, which is now complete, unless bugs are found and reported.
Richard
javaif package replaced
This package is now maintained under woof-CE, so can be included in future Puppy distro versions. While submitting it, I updated the interface package to correct a minor bug that eventually resolves itself anyway. The details are in the new "UPDATE" paragraph in the first message of this thread.
A day later, I updated the package further, to avoid the possibility of duplicate menu entries for the Java Control Panel.
Richard
A day later, I updated the package further, to avoid the possibility of duplicate menu entries for the Java Control Panel.
Richard