Java Interface for Open-source Java Dev Kit & Runtime Envmt.

Miscellaneous tools
Post Reply
Message
Author
User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

Java Interface for Open-source Java Dev Kit & Runtime Envmt.

#1 Post by rerwin »

Now that Oracle has changed the packaging and licensing rules for Java, the open-source OpenJDK (& JRE) becomes essential for use in Puppy (and any Linux). Oracle licensing prohibits free redistribution of its proprietary versions. Java versions after 8 support only 64-bit architectures; versions after 10 no longer include the Java Network Launch Protocol (JNLP - javaws) feature. The 32-bit version of JRE is no longer available for free.

I have upgraded the "Java Interface" (javaif) components to support OpenJDK, whether installed from the package manager repositories or obtained elsewhere. The JNLP function is provided by "Iced Tea" packages identified as icedtea-web or icedtea-netx, which are also in the repos.

A source of up-to-date versions of OpenJDK and IcedTea is AdoptOpenJDK (https://adoptopenjdk.net). I have downloaded JDK (& JRE) 12, JDK 11 JDK-JRE and IcedTea-Web 1.8.3, and made SFS and pet packages of them, available from my MediaFire account:
http://www.mediafire.com/folder/n1gwntca5dh12/Open_Java

UPDATE 11/18/2019:
The LTS version, 11, has been updated to 11.0.5. I have uploaded an SFS file containing it and IcedTea-Web-1.8.3 together:
http://www.mediafire.com/file/0bc94x4yb ... 0.sfs/file
End of update

The "get_java" pet package has downoaded the Oracle-provided Javas as well as creating pets and SFS files for any java archive (tarball). It was intended to avoid re-distributing of the Oracle packages by letting users download their own copy. Now that I am aware that open-source versions are available, there is no need for the get_java download function.

Although get_java can build java archives into pets and SFS packages, that opertion is so simple that a separate tool is unnecessary. The steps:
  • 1. Download a tar.gz archive file from a web site.
    2. Create a new directory/folder, /opt/[jdk or jre]-[version from archive name].
    3. Click on the archive file and expand it into the new directory.
But why not just use the pre-built pet or SFS file? Whenever AdoptOpenJDK has a newer version than has been added to a Puppy repo or my MF account, a user can easily make an SFS file. with mksquashfs, from a directory named [archive file name]/opt/[jdk or jre]-[version from archive name].

Unless there is a demand for a tool to build from archives, I intend to discontinue development of get_java and remove it from woof-CE. I encourage placing the AdoptOpenJDK packages in the Puppy repos, for general access.

The simplest and probably best way to get the latest 32-bit version of JRE is to install it from the PPM repos. Starting with Bionic Pup, the latest version is actually 11 along with Iced Tea 1.8. The icedtea-netx package will be installed with its dependency version of openjdk. The installed size is about 160M.

The BusterPup repo also has openjdk 11 but with icedtea-netx 1.7.2, which still works. However, installing its icedtea-netx or openjdk-jre may not include openjdk-jre-headless, which is required, so must be installed, too.

To check an installation of a Java package or to make it usable without rebooting, enter from a console/terminal:
javaiftest
If IcedTea-netx/Web is installed, this will include a check of the JNLP support. Be sure to respond to that prompt, to skip or select it. It will pop up a demonstration window.

To support the OpenJDK packages, the new version of javaif must be installed. Use the attached package at least until its contents are added to woof-CE and included in new puppy distros.
Richard
Attachments
javaif-20191009.pet
Supports open-source OpenJDK and IcedTea Java packages as well as
those in ubuntu & debian repositories.
Now with corrections to debian icedtea & openjdk support.
(9.18 KiB) Downloaded 170 times
javaif-20190929.pet
Supports open-source OpenJDK and IcedTea Java packages.
Now with more improvements after 20190917 version.
Removed obsolete Java Control Panel support.
(8.84 KiB) Downloaded 144 times
javaif-20190917.pet
Supports open-source OpenJDK and IcedTea Java packages.
Now with several improvements after 20190912 version
(11.11 KiB) Downloaded 157 times
Last edited by rerwin on Mon 18 Nov 2019, 20:46, edited 4 times in total.

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#2 Post by rerwin »

Uploaded version 20190917 with fixes to tolerate some unusual situations.

While testing alienbob's Slacko-built OpenJDK packages I made some user errors that led me to improve handling of such mistakes, such as using the wrong architecture version and having unloaded a package, which leaves empty directories.

I also tried alienbob's 32-bit package in BionicPup32. It passes the "Hello World" test (javaiftest command).
Richard

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#3 Post by rerwin »

Uploaded version 20190929 which eliminates the setting of links to icons and plugins and removes the "Java Control Panel" from the menu, because they are not needed after JDK/JRE 8.

The javaiftest script (run in a console/terminal) not only shows the current configuration of the Java packages but, because it completes the Java setup, makes an installation change effective immediately without rebooting.

Although the deb (from the PPM) and SFS versions of JRE and IcedTea-netx/Web work together in any combination in BionicPups and Buster Pups, in ScPup the PPM version of IcedTea-netx is unusable. But the (AdoptOpenJDK) IcedTea-Web SFS package seems to work with the deb version of openjre-8 or the OpenJDK-12-jre SFS package.

Note, though, that the new OpenJDK-13-jre package disables IcedTea-Web, due to an problem which appears to have a fix that has not yet been released (IcedTea-Web 1.8.4?).

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#4 Post by Puppyt »

Thank you very much for arranging all these, rerwin, thanks :)

However, I seem to have my "stupid" hat on. I have recently installed a fresh copy of radky's BusterPup64 [EDIT: NO SUCH THING - I misread the specs in my haste! 32-bit only (headslap)] on an old Panasonic CF-52 I plan to re-purpose as a dos games machine. I can install dosbox 0.74 from PPM, and have started to install the latest DBGL (DosBoxGameLauncher 0.90 from here http://members.quicknet.nl/blankendaalr/dbgl/. However, it requires JAVA so I found your updates here. Having downloaded and loaded the jre sfs for 12.0.2 I get
# java
bash: /opt/jdk-12.0.2+10-jre/bin/java: cannot execute binary file: Exec format error
Head spinning with all these options - how do I just get java registering easily - is there a symlink trick please - why am I getting this wrong? Have tried using the pet also on earlier attempts, to the same null result for DBGL/java. Cheers.

UPDATE: OpenJDK12U-jre-12.0.2_10-x86_64-AdoptOpenJDK installed as a pet also gives me javaif>The Java Runtime Environment is not installed. I'll try some others...
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

javaif updated to 20191009

#5 Post by rerwin »

Puppyt,
Sorry to be so slow in responding to your report. I did not not expect to see much feedback.

I have been fixing the code for debian-repo versions of icedtea and openjdk, which I have now uploaded to this thread.

The reason you are having problems with the AdoptOpenJDK packages is that they are for 64-bit architecture, whereas BusterPup is 32-bit.

Please try my updated javaif package and install:
- icedtea-netx_1.7.2-2
- openjdk-11-jre_11.0.4+11-1 (and openjdk-11-jre-headless_11.0.4+11-1, if not automatic)
from the PPM debian repo. Before installing, be sure to update the repos to get openjdk 11.

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

Combined OpenJDK-jre and IcedTea-web in new SFS package

#6 Post by rerwin »

The LTS version of OpenJDK, 11, has been updated to 11.0.5. I have uploaded an SFS file containing it and IcedTea-Web-1.8.3 together:
http://www.mediafire.com/file/0bc94x4yb ... 0.sfs/file

Note that OpenJDK 12 is now at "end-of-life", superseded by version 13. However, that version breaks IcedTea-Web (netx). Although that issue has been addressed by the IcedTea developers, an updated IcedTea-Web package has not been released. My guess is that they are waiting for the next LTS release, OpenJDK 15. In the meantime use version 11 unless you do not need the IcedTea support of .jnlp files; otherwise, you can try version 13 or 14 (when available).

Post Reply