4 ms·
I can't seem to upgrade to Java 9 still. Its the module system. Waiting for open source to catch up in some situations. See one of the problems is that the way
by rhacker 9y ago
I can't seem to upgrade to Java 9 still. Its the module system. Waiting for open source to catch up in some situations. See one of the problems is that the way Java is started needs to change to enable JAXB. But many open source products have lots of code that start Java processes, and never use that command line. Did this change in Java 10, did they bring back JAXB so things will start again?
- SanderMak 9y agoNope. In fact the module containing JAXB (and 5 other EE technologies) have been deprecated and will be removed in Java 11. So indeed, you can use the `--add-modules java.xml.bind` workaround, but it will break with Java 11. The real solution is to add a JAXB implementation of your choice as dependency to the application. (disclaimer: I'm author of the O'Reilly book Java 9 Modularity (see https://javamodularity.com https://javamodularity.com) which discusses this and other migration issues in great detail)
- krzyk 9y agoIf you are using maven you can try following dependencies for JAXB from glassfish: <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <version>2.3.0</version> </dependency> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-core</artifactId> <version>2.3.0</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.0</version> </dependency> As other commenter said, JAXB will disappear form Java 11 (and all other Java EE stubs that exist in Java SE) so it is better to upgrade sooner than later. And BTW, I would skip Java 9 and go straight to Java 10 now.