Skip to content

javac does not resolve non-default JRE modules / packages #307

Open
@fipro78

Description

@fipro78

I created a project that uses API from OpenJ9 to create a checkpoint for a CRIU evaluation. The necessary classes are in the Java module openj9.criu inside the package org.eclipse.openj9.criu. In my setup I have a IBM Semeru JDK with OpenJ9 installed. The IDE is able to resolve and compile the classes. But the Maven build fails with the error:

package org.eclipse.openj9.criu does not exist

If I try to add the module openj9.criu the error message says

module not found: openj9.criu

I opened a ticket at openj9 who also didn't get the issue: eclipse-openj9/openj9#18205

After playing around a bit more, I noticed that switching to the eclipse compiler plugin the compilation succeeds.

For me it looks like [plexus-compiler-javac](https://codehaus-plexus.github.io/plexus-compiler/plexus-compilers/plexus-compiler-javac/) is not really using the JDK that is used to start the Maven build, while [plexus-compiler-eclipse](https://codehaus-plexus.github.io/plexus-compiler/plexus-compilers/plexus-compiler-eclipse/) is using it correctly.

I have created a new branch in my deployment benchmark example repository:

https://github.com/fipro78/osgi_deployment_options/tree/criu

The project that contains the CRIUSupport usage is in org.fipro.osgi.benchmark.criu

If you build from the root directory via

mvn clean verify -Pcriu

you should see the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions