How to run Java 9 application with classpath rather than module path in IDEA? -
when run main class in idea, puts module , dependencies on module path. possible change classpath?
if don't define module-info, idea set application , dependencies on classpath. since have module-info it's explicit module has on module path. handle dependecies automatic-modules.
howsoever, dependencies @ least have reason on classpath. discussed here why java 9 not turn jars on class path automatic modules?
for example, mymodule depends on automatic-module needs jar can't become automatic-module yet. on commandline this:
java -cp legacy.jar -p "mymodule.jar;automodule.jar;" -m mymodule/com.example.mymodule.application
imo intellij doesn't support that. workaround run entire application on classpath @ least, rename model-info disabling/not jigsaw-module moment.
Comments
Post a Comment