"Unknown constant pool type 19" during Java 9 build with module declaration [message #1774432] |
Sat, 14 October 2017 05:30  |
Eclipse User |
|
|
|
I created a simple Java 9 hello world application (an example is here https://github.com/CodeFX-org/demo-jpms-hello-world). Whenever I declare a module, the Java builder fails with the following message:
Quote:
Errors running builder 'Java Builder' on project 'demo-jpms-hello-world-master'.
Unknown constant pool type 19
Subsequent tries to run the hello world program naturally fail, the error message is as follows:
Quote:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module org.codefx.demo.jpms_hello_world not found
Commenting out all content of module-info.java makes the builder and the program execution run as expected.
At the same time, compiling and running from the command line works as expected. Using the above hello world example, this is the code that works:
javac -d target/classes $(find src -name '*.java')
jar --create --file target/jpms-hello-world.jar --main-class org.codefx.demo.jpms.HelloModularWorld -C target/classes .
java --module-path target/jpms-hello-world.jar --module org.codefx.demo.jpms_hello_world
I am running Eclipse Oxygen.1a Release (4.7.1a) on Java 9+181.
As suggest by Eric Rizzo, this is a repost of https://www.eclipse.org/forums/index.php/t/1089414/.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04946 seconds