Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] The location of module-info.java and muti release jar

If I understand the plan correctly (https://eclipse-ee4j.github.io/jakartaee-platform/jakartaee10/JakartaEE10ReleasePlan) I thought we are planning to produce API JARs for Jakarta 10 that are at Java 11 source/target levels.
 
With that said, I don't see why we would use multi-release JARs for any of the API JARs in Jakarta 10.
 
Tom
 
 
 
----- Original message -----
From: "Thiago Henrique Hupner" <thihup@xxxxxxxxx>
Sent by: "jakartaee-platform-dev" <jakartaee-platform-dev-bounces@xxxxxxxxxxx>
To: "jakartaee-platform developer discussions" <jakartaee-platform-dev@xxxxxxxxxxx>
Cc: "jakartaee-platform developer discussions" <jakartaee-platform-dev@xxxxxxxxxxx>
Subject: [EXTERNAL] Re: [jakartaee-platform-dev] The location of module-info.java and muti release jar
Date: Thu, Oct 7, 2021 12:43 PM
 
What is possible to do is the following:
 
Run the compilation two times: one targeting JDK 11, which will compile the module-info, and other targeting JDK 8, will
override the classes built for JDK 11 with 8, and only the module-info will be there.
 
I guess using Moditect is also possible.
 
On Out 7 2021, at 2:38 pm, Scott Stark <starksm64@xxxxxxxxx> wrote:
How can you produce a jar that can be read by Java SE 8 unless it is multi-release? The comment there is talking about compiling under SE 11 which cannot be read at all by SE 8. The most basic class file compiled under 11 blows up when using 8:
 
└> /Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home/bin/java Hello
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: Hello has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Sent from Mailspring
On Oct 7, 2021 at 12:28:19 PM, Emily Jiang via jakartaee-platform-dev <jakartaee-platform-dev@xxxxxxxxxxx> wrote:
Since we are on the topic of module-info, I observed different specifications doing different things as far as the location goes. Also, some spec produces multi-release jar such as Injection spec (see here).
 
I was told some other specs just place module-info.class under root and do not produce a multi release jar as module-info.class will be ignored by Java 8 (the api jar compiled at Java 8). This is a cleaner way to do it.
 
Can we define a convention for this? I know EJB is trying to add module-info as well and a long conversation is happening(see this PR). We really need to sort it out on the platform level.
 
--
Thanks
Emily
_______________________________________________
jakartaee-platform-dev mailing list
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev
 



Back to the top