[RESOLVED] Dependencies of class files Follow
Answered
Hello, is it always possible to use a library of class files instead of jar files in the recent releases ?
In IntelliJ 2020 i have not problems with that, but since the last year whenever i try a new release i can't even compile a Hello World application without use my library in the form of a jar file (module not found exception with 'requires mymodule' in module-info).
When you indicate dependencies for your project, IntelliJ create always a --classpath option in the command line, with witch you can target directories of class files, thus i don't understand why it doesn't work anymore...
Please sign in to leave a comment.
Hello,
Is it possible to provide project example for investigation?
Sorry for the delay.
The project structure is :
HelloWorld > src > helloworld > main > Main.java
HelloWorld > src > helloworld > module-info.java
The main class :
The module-info file :
javafx.base, javafx.graphics and bb.base are global libraries in the dependencies of the hellloworld module.
bb.base is a global library module located in "home/brice/Documents/Code/Java/lib/class/bb/bb.base", a directory which contains the module-info.class file.
The command line is:
And the error is :
Does it work from command line outside IDE?
I always forgot to test the command line separetly; no it doesn't work, but when i add the /home/brice/Documents/Code/Java/lib/class/bb/bb.base path in the -p section without changing anything else, yes.
Thus inside the IDE, the VM options in the configuration dialog must be modified, otherwise the default behavior block.
Thank you.