Page 1 of 1

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

Posted: 24 Jun 2020, 18:43
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

Re: Multi-Release Jars seem not to be working

Posted: 25 Jun 2020, 11:08
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

Re: Multi-Release Jars seem not to be working

Posted: 25 Jun 2020, 13:05
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.

Re: Multi-Release Jars seem not to be working

Posted: 29 Jun 2020, 09:19
by Janak Mulani
Thanks for providing the sample. We will investigate and come back to you.

Re: Multi-Release Jars seem not to be working

Posted: 30 Jun 2020, 12:30
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.

Re: Multi-Release Jars seem not to be working

Posted: 02 Jul 2020, 11:05
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.

Re: Multi-Release Jars seem not to be working

Posted: 02 Jul 2020, 15:26
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 !

Re: Multi-Release Jars seem not to be working

Posted: 02 Jul 2020, 15:33
by Stephan Classen
This will be fixed in alpha2

Re: Multi-Release Jars seem not to be working

Posted: 23 Jul 2020, 18:22
by Schriek
Thanks for your quick reply.

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

Re: Multi-Release Jars seem not to be working

Posted: 22 Apr 2021, 12:24
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