Hi Alan, Mandy, Thank you for the hint about keeping classical jars in classpath.
I use Intellij Idea in development and Maven for building the project. IntelliJ Idea has an early support for Java 9 but it should involve a bit more. For example I didn't see a way to choose which jars will be in classpath and which jars will be in module path. As Maven, I also didn't see a way for classpath/modulepath seperation. >From this experience I can choose Gradle for flexibility. Thanks. 2017-04-11 9:58 GMT+03:00 Alan Bateman <alan.bate...@oracle.com>: > On 10/04/2017 22:49, Rahman USTA wrote: > > : >> >> 1) Error occurred during initialization of boot layer >> java.lang.module.FindException: Unable to derive module descriptor for >> \.m2\repository\net\java\dev\jna\jna-platform\4.4.0\jna-plat >> form-4.4.0.jar >> Caused by: java.lang.module.InvalidModuleDescriptorException: Main-Class >> com.sun.jna.Native not in module >> > I don't know why this JAR file has a Main-Class attribute but I assume > that `java -jar jna-platform-4.4.0.jar` doesn't work or only works when the > JAR file containing the entry point is brought into the environment. > > I see Mandy's note about this JAR file seems to have code that using the > AWT peer API so I assume this library is going to need work anyway. > > >> 2) Error occurred during initialization of boot layer >> java.lang.module.FindException: Unable to derive module descriptor for >> \.m2\repository\org\apache\xmlgraphics\batik-script\1.8\bati >> k-script-1.8.jar >> Caused by: java.lang.module.InvalidModuleDescriptorException: Provider >> class org.apache.batik.bridge.RhinoInterpreterFactory not in module >> >> 3) Error occurred during initialization of boot layer >> java.lang.module.FindException: Unable to derive module descriptor for >> \.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar >> Caused by: java.lang.module.InvalidModuleDescriptorException: Provider >> class org.apache.bsf.BSFManager not in module >> > The class path is leaky in that a JAR file can name a class in its > META-INF/services configuration file and the class is loaded from another > JAR file. It would be interesting to see if that is the case with these two > projects. I assume if deployed in isolation on the class path that > ServiceConfigurationError is throw when the providers cannot be loaded. > > As regards moving forward then do you have direct dependences on these > libraries? If the dependences not direct then you could leave these JAR > files on the class path (assuming they actually work there). When migrating > to modules then it's okay to do this, esp. with legacy libraries with > issues that prevent them being used as modules. > > -Alan > -- Rahman USTA Istanbul JUG https://github.com/rahmanusta