Skip to content

[Java24] Create new .properties files and compiled class files #6529

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Mar 21, 2025

Closes #6531

@chrisrueger chrisrueger changed the title Jdk24 preparation [Java24] Create new .properties files and compiled class files Mar 22, 2025
@chrisrueger chrisrueger marked this pull request as ready for review March 24, 2025 11:20
@chrisrueger
Copy link
Contributor Author

chrisrueger commented Mar 31, 2025

@bjhargrave could you maybe have a look? I tried having a look at past PRs from you, but not sure what I missed.
@kriegfrj FYI since related to recent #6508

I will squash commits at the end.

Copy link
Member

@bjhargrave bjhargrave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also should update the CI build to test with JDK 17 (which is the minimum version required), all subsequent LTS versions (21) and also the latest released version (24).

You should also investigate any changes to the JVMS since JDK 17 which may need updates to the biz.aQute.bnd.util/src/aQute/bnd/classfile package.

@chrisrueger
Copy link
Contributor Author

chrisrueger commented Mar 31, 2025

You should also investigate any changes to the JVMS since JDK 17 which may need updates to the biz.aQute.bnd.util/src/aQute/bnd/classfile package.

I checked https://docs.oracle.com/en/java/javase/24/language/java-language-changes-summary.html

To me it looks like SealedClasses permanent in Java 17 were the last major JVM change relevant* for bnd.

* with 'relevant' I mean mainly things which affect types and packages which are needed to calculate manifest.

What is your opinion on Preview features? When would we consider supporting them? @bjhargrave

I first thought about Module Import Declarations but I don't think we need to handle them specifically since the byte code still contains import package declarations as usual (in other words they are expanded under the hood).

@stbischof
Copy link
Contributor

i am just here to say thank you @chrisrueger

@bjhargrave
Copy link
Member

What is your opinion on Preview features? When would we consider supporting them?

Your link is to the JLS. I am talking about the JVMS which specifies the class file format: https://docs.oracle.com/javase/specs/jvms/se24/html/jvms-4.html. But it does appear there are no class file format changes since 17.

@chrisrueger chrisrueger force-pushed the jdk24-preparation branch 2 times, most recently from 5bee245 to aa84952 Compare March 31, 2025 18:24
@chrisrueger
Copy link
Contributor Author

@bjhargrave question to PR #6536 next door where I am experimenting with upgrading to use latest Eclipse 2025-03.

I get java.lang.foreign not found, which is a package from JavaSE_21.properties

Resolution failed. Summary:
      ⇒ Bundle: org.eclipse.sdk cannot be resolved
              ⇒ Require-Bundle: org.eclipse.help.base; version=[4.0.0,5.0.0) cannot be resolved
                      ⇒ Require-Bundle: org.apache.lucene.core; version=[10.0.0,11.0.0) cannot be resolved
                              ⇒ because Import-Package requirement for: java.lang.foreign could not be provided by any available bundle or dependency

i have -runee: JavaSE-21

Would that error go away once this PR here is inside bnd? Are those package .properties files considered for resolution?
My interpretation would be yes because of

//
// Load the EE's and packages that belong to it.
//
EE tmp = EE.parse(properties.getProperty(Constants.RUNEE));
EE ee = (tmp != null) ? tmp : EE.JavaSE_1_6;
system.addEE(ee);

but wanted to confirm.

BTW: Eclipse 2024-12 is running fine. This error starts with 2025-03

@bjhargrave
Copy link
Member

Would that error go away once this PR here is inside bnd?

Probably since Bnd will then know about the new packages added since Java 17.

- using https://github.com/chrisrueger/jdk-packages and https://github.com/bjhargrave/java-platform-packages

e.g.

./download_jdk.sh 24 mac aarch64
./list_jdk_packages_for_bnd.sh 24 mac aarch64 > "JavaSE_24.properties"

- compile classes with newer JDKs up to 24
- Update compilerversions.jar (via bnd buildx compilerversions.bnd)
- Update MultiReleaseTest.java
- add enums for more future JAVA versions
- remove properties for JDK 18,20,23 because packages are equal to the prior version
- CI Build: remove deprecated security manager
- CI Build: build with LTS JDK 21 and JDK23
- CI Build: JDK 24 will come later as it is not supported by gradle yet (maybe in 8.14)

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger
Copy link
Contributor Author

Would that error go away once this PR here is inside bnd?

Probably since Bnd will then know about the new packages added since Java 17.

Thanks @bjhargrave

I squashed all commits now. Would be ready to go then.

@bjhargrave bjhargrave merged commit 502a532 into bndtools:master Apr 1, 2025
11 checks passed
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

Successfully merging this pull request may close these issues.

[Java24] Create new .properties files and compiled class files
3 participants