Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module-info.java file #6

Open
Sineaggi opened this issue Jul 31, 2023 · 2 comments
Open

Add module-info.java file #6

Sineaggi opened this issue Jul 31, 2023 · 2 comments

Comments

@Sineaggi
Copy link

Add crac module for modular application support. Maybe use a multi-release jar so the module info file can be compiled on java 9+ and the base code can be compiled with 8.

@AntonKozlov
Copy link
Member

Could elaborate on example where that would be helpful?

Indeed, we won't raise minimal requirements from Java 8, as for now, a Java 8 apps can run on JDK 17 CRaC and successfully coordinate with the checkpoint.

@Sineaggi
Copy link
Author

So for example spring-framework uses org.crac.Resource, a class in this library to support stop-and-restart for spring. By adding a module-info.java, it would allow spring-context to be fully modularized.

As a stop-gap, it would be possible to add an Automatic-Module-Name to the jar's manifest to reserve a module name for the library, to avoid java from falling back to the jar name to derive an automatic module name.

FWIW, there are numerous libraries that use MR-jars to build a java-8 compatible core then place a module-info.java into the META-INF/versions/9 directory in the jar file. They would use java 8 (or higher) to compile 8-compatible code, then 9 (or higher) to compile the module-info.java file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants