Can't run java project with module warning [message #1831055] |
Mon, 10 August 2020 20:10  |
Eclipse User |
|
|
|
I have a simple java project that has a lib folder with swt.jar in it. It was added to the modulepath in the project's Properties > Java build path > Libraries dialog. When I import and use an swt class in my class, I'm prompted to add an entry to my module-info file. It adds "swt" with a warning:
Name of automatic module 'swt' is unstable, it is derived from the module's file name.
When I try to run the project as a java application I get this error in console and nothing runs:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module swt not found, required by ca.footeware.swt.converter
If I export the project as a runnable jar with dependencies enclosed, it works with a similar warning. The exported jar does run (but it's not a convenient development cycle :)
On another note, if instead of adding the jar to a lib folder, I add it as a user library, the export wizard fails to package the dependency in the jar and it doesn't run. But I'll save that one for another day.
I'm running eclipse 4.16 with OpenJDK-14.
Any help appreciated,
Craig
|
|
|
|
|
|
|
Re: Can't run java project with module warning [message #1831487 is a reply to message #1831444] |
Thu, 20 August 2020 11:53  |
Eclipse User |
|
|
|
Got it working! I'm on linux so my --module-path delimiter should have been : not ;
My final VM args:
--module-path ca.footeware.converter:ca.footeware.converter.temperature:/home/craig/Downloads/swt.jar -m ca.footeware.converter/ca.footeware.converter.Converter
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds