[SOLVED] Multi-Release Jars seem not to be working
[SOLVED] Multi-Release Jars seem not to be working
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
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
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Multi-Release Jars seem not to be working
Can you please attach a sample Multirelease Jar file of a JavaFx app that we can use to reproduce your issue?
Thanks
Thanks
Re: Multi-Release Jars seem not to be working
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.
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 681 times
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Multi-Release Jars seem not to be working
Thanks for providing the sample. We will investigate and come back to you.
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Multi-Release Jars seem not to be working
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.
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 (14.42 KiB) Viewed 13805 times
-
- Posts: 763
- Joined: 24 Mar 2020, 13:37
Re: Multi-Release Jars seem not to be working
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.
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.
-
- Posts: 20
- Joined: 01 Jun 2020, 14:20
Re: Multi-Release Jars seem not to be working
Hi Janak,
I already noticed (viewtopic.php?f=21&t=51) alpha1 somehow can't handle j2se version 11 ?!
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 !
I already noticed (viewtopic.php?f=21&t=51) alpha1 somehow can't handle j2se version 11 ?!
May I create an issue or are you aware it will be corrected in alpha 2?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:
In jnlp, j2se version is "11+" . That is working with 1.1.7. Tried 11.0* , 11*, 11.0+. the same.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)
What is working : 1.8+ !? (<== and that's only at that time that AdopOpenJDK 11.0.6 was loaded. Set as prefered vendor)
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 !
-
- Posts: 232
- Joined: 27 Mar 2020, 09:55
Re: Multi-Release Jars seem not to be working
This will be fixed in alpha2
Re: Multi-Release Jars seem not to be working
Thanks for your quick reply.
Both cases (sample application and real world application) work with v3.0.0-alpha1.
Both cases (sample application and real world application) work with v3.0.0-alpha1.
-
- Posts: 232
- Joined: 27 Mar 2020, 09:55
Re: Multi-Release Jars seem not to be working
A fix for the multi release problem was added to the version 1.4.0:
https://github.com/AdoptOpenJDK/IcedTea-Web/pull/797
https://github.com/AdoptOpenJDK/IcedTea-Web/pull/797