[SOLVED] Multi-Release Jars seem not to be working

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
Schriek
Posts: 3
Joined: 06 May 2020, 11:36

[SOLVED] Multi-Release Jars seem not to be working

Post by Schriek »

In order to be able to run our application in Java 8 and also Java 11 environments, we have built multi-release-Jars when the implementation differs (especially in JavaFX related classes).
The MR-Jars are working in the server environment but apparently not with OpenWebStart. When the Java 11-version should be loaded only the default Java 8-version is loaded.
Is it intended to support MR-Jars in OpenWebStart?
The Java 9-Webstart implementation seemingly also had difficulties with MR-Jars: https://bugs.openjdk.java.net/browse/JDK-8192748

Kind Regards

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Multi-Release Jars seem not to be working

Post by Janak Mulani »

Can you please attach a sample Multirelease Jar file of a JavaFx app that we can use to reproduce your issue?

Thanks

Schriek
Posts: 3
Joined: 06 May 2020, 11:36

Re: Multi-Release Jars seem not to be working

Post by Schriek »

instead of posting the real app I have attached a little Swing-based sample application which shows the behaviour that the version/11 branch of the jar file is not used.
The button texts in this app should have "(Java 11)" appended.
Running the application with Java 11, still the default texts with "(You should not see me here in Java 11)" appended are shown.
Attachments
WsSample.zip
jnlp-file and jar showing the problem
(7.96 KiB) Downloaded 322 times

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Multi-Release Jars seem not to be working

Post by Janak Mulani »

Thanks for providing the sample. We will investigate and come back to you.

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Multi-Release Jars seem not to be working

Post by Janak Mulani »

Hi

I ran the sample with OWS with both java 11 and Java 8. I see the attached screenshot for Java 11. Clearly the Java 11 compiled class is ignored.

I also ran your program directly (i.e. without OWS) with respective JDKs and see the expected behavior.

Thanks for reporting this issue. I will create a bug report.
Attachments
MultiRel-11.PNG
MultiRel-11.PNG (14.42 KiB) Viewed 9980 times

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Multi-Release Jars seem not to be working

Post by Janak Mulani »

Can you please try it with https://github.com/karakun/OpenWebStart ... 0.0-alpha1 ?

This release has a major changes to the way IcedTeaWeb classloader works.

In the jnlp file specify java/j2se version as 1.8+ instead of 11*.

For me it worked like this.

We will make a new release of OWS 3.0.0 alpha2 soon.

Th3WalkingDad
Posts: 20
Joined: 01 Jun 2020, 14:20

Re: Multi-Release Jars seem not to be working

Post by Th3WalkingDad »

Hi Janak,

I already noticed (viewtopic.php?f=21&t=51) alpha1 somehow can't handle j2se version 11 ?!
About the 3.0.0alpha, that's strange but with the same jnlp used previously (indeed sent back with application/x-java-jnlp-file MIME) I get that error:

Code: Select all

net.sourceforge.jnlp.LaunchException: Fatal: Read Error: Could not read or parse the JNLP file ...
....
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Could not locate a suitable JRE description in the JNLP file for the underlying execution environment. The system properties detected are as follows: (locale: en_US, OS: Windows 10, OS arch: amd64, Java version: 1.8.0_242)
In jnlp, j2se version is "11+" . That is working with 1.1.7. Tried 11.0* , 11*, 11.0+. the same.
What is working : 1.8+ !? (<== and that's only at that time that AdopOpenJDK 11.0.6 was loaded. Set as prefered vendor)
May I create an issue or are you aware it will be corrected in alpha 2?

Do you know if this https://github.com/karakun/OpenWebStart/pull/286 will be part of the alpha2 too ?
But most important IMHO is the dead lock at startup because of the log (?)... End-users may work forever with this one ! :-/

Thx !

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Multi-Release Jars seem not to be working

Post by Stephan Classen »

This will be fixed in alpha2

Schriek
Posts: 3
Joined: 06 May 2020, 11:36

Re: Multi-Release Jars seem not to be working

Post by Schriek »

Thanks for your quick reply.

Both cases (sample application and real world application) work with v3.0.0-alpha1.

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Multi-Release Jars seem not to be working

Post by Stephan Classen »

A fix for the multi release problem was added to the version 1.4.0:
https://github.com/AdoptOpenJDK/IcedTea-Web/pull/797

Post Reply