|"Unknown constant pool type 19" during Java 9 build with module [message #1774368]
||Fri, 13 October 2017 11:28
| ecl ecl
Registered: October 2017
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:|
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:
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.
For a solution (in my case), see https://www.eclipse.org/forums/index.php?t=msg&th=1089434&goto=1774461&#msg_1774461.
[Updated on: Mon, 16 October 2017 09:53]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03744 seconds