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 Wed 31 Aug 2016, 12:19
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
get_java-1.0.1 - August 20, 2016
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Author Message
rerwin


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Mon 09 Nov 2015, 17:51    Post subject:  get_java-1.0.1 - August 20, 2016
Subject description: All-in-One Java downloader, package-builder, installer/loader with common, automatic interface
 

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.
get_java.conf-patch-20160820.pet
Description  Updated configuration file, to match changes in Oracle URLs
For get_java-1.0 only - already in version 1.0.1
pet

 Download 
Filename  get_java.conf-patch-20160820.pet 
Filesize  994 Bytes 
Downloaded  13 Time(s) 
get_java-1.0.1.pet
Description  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.
pet

 Download 
Filename  get_java-1.0.1.pet 
Filesize  11.49 KB 
Downloaded  222 Time(s) 
javaif-20160616.pet
Description  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
pet

 Download 
Filename  javaif-20160616.pet 
Filesize  11.27 KB 
Downloaded  226 Time(s) 

Last edited by rerwin on Sun 21 Aug 2016, 12:56; edited 21 times in total
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Mon 09 Nov 2015, 17:52    Post subject: More Details  

EDIT: No longer true -- disregard:
Quote:
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.

Last edited by rerwin on Sat 09 Jan 2016, 17:59; edited 2 times in total
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1171
Location: the australian mallee

PostPosted: Tue 10 Nov 2015, 05:56    Post subject: Re: More Details  

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.


Hi rerwin,

Have a look at
http://murga-linux.com/puppy/viewtopic.php?p=871254#871254

It's how I handle jre and as long as youve setup first time properly works ok for upgrades.

regards
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Tue 10 Nov 2015, 07:30    Post subject: Re: get_java-0.1-beta - November 9, 2015
Subject description: All-in-One Java downloader, package-builder, installer/loader with common, automatic interface
 

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

Tried them in Fatdog64-701:
Code:
# 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")
#
Any clue?
If I replace
Code:
SPACEAVAILABLE=$(($SPACEAVAILABLE-$LEAVESPACEMB))

by
Code:
SPACEAVAILABLE=$(echo $SPACEAVAILABLE - $LEAVESPACEMB | bc)

I get:
Code:
# 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 `]'
#

OK
replace [] by [[]]
and insert a space before ] Wink
get_java.png
 Description   
 Filesize   22.61 KB
 Viewed   1071 Time(s)

get_java.png

Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Tue 10 Nov 2015, 09:40    Post subject: Re: get_java-0.1-beta - November 9, 2015
Subject description: All-in-One Java downloader, package-builder, installer/loader with common, automatic interface
 

L18L wrote:
Any clue?

Got it!
No bc required
SPACEAVAILABLE is NOT a single value

Code:
# get_java
SPACEAVAILABLE=Verfügbar 2911 1849 1967 0 0 2911 2911 1971 1970 0 0 0
SPACEAVAILABLE=2811
#


Line 117-128
Code:
   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

Let us hope this is the only difference inFatdog64-701 Laughing

EDIT
Thus just insert
Code:
    SPACEAVAILABLE=$(echo $SPACEAVAILABLE | cut -d" " -f2)

before
Code:
    SPACEAVAILABLE=$(($SPACEAVAILABLE-$LEAVESPACEMB))
for Fatdog (only?)
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Tue 10 Nov 2015, 21:37    Post subject:  

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

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Wed 11 Nov 2015, 04:11    Post subject: get_java-0.2-beta
Subject description: Fatdog
 

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


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Wed 11 Nov 2015, 21:24    Post subject:  

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:

    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!
R
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Thu 12 Nov 2015, 08:12    Post subject: get_java-0.2-beta
Subject description: working
 

I ran get_java to build an SFS file and then load the file.
Code:
# 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!
#

Thank you.
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Fri 13 Nov 2015, 15:47    Post subject:  

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


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Sun 15 Nov 2015, 18:29    Post subject: 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.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8534
Location: qld

PostPosted: Sun 15 Nov 2015, 19:16    Post subject:  

Hi Richard,

I'm running slacko64 but the test detected I had a 32 bit OS.

Here's why..

Code:
# . /etc/DISTRO_SPECS
# echo $DISTRO_NAME
Slacko64 Puppy


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.

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1696
Location: Maine, USA

PostPosted: Sun 15 Nov 2015, 23:08    Post subject:  

01micko,
Thanks for reporting those mistakes.

1 .I changed the test to:
Code:
if echo $DISTRO_NAME | grep -q '64[ $]'

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:
Code:
\n\n$(eval_gettext

Re-uploaded 0.3 after download number 4.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Thu 19 Nov 2015, 05:33    Post subject: 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
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?

Why emulate, there is http://www.android-x86.org/
BTW there is a thread about it.
It can be installed frugally, no need for java.
MoManager-de-FATDOG.tar.gz
Description  containing German translation file
/usr/share/locale/de/LC_MESSAGES/get_java.mo
gz

 Download 
Filename  MoManager-de-FATDOG.tar.gz 
Filesize  5.15 KB 
Downloaded  77 Time(s) 

Last edited by L18L on Fri 20 Nov 2015, 04:44; edited 1 time in total
Back to top
View user's profile Send private message 
Skydog007

Joined: 20 Aug 2015
Posts: 30
Location: Mt.Somewhere

PostPosted: Thu 19 Nov 2015, 16:19    Post subject: 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?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
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.0648s ][ Queries: 12 (0.0045s) ][ GZIP on ]