How to migrate JavaFX app from JDK 1.8 to JDK 10 [duplicate]
How to migrate JavaFX app from JDK 1.8 to JDK 10 [duplicate]
This question already has an answer here:
I have a legacy JavaFX app which compiles and runs correctly on JDK 1.8. To move to JDK 10 I've added these to the pom.xml:
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>10</release>
<compilerArgs>
<arg>--add-modules</arg>
<arg>javax.xml.bind</arg>
</compilerArgs>
</configuration>
</plugin>
Running mvn clean install -DskipTests
with JDK 10.0.1 and mvn 3.3.9 gives
mvn clean install -DskipTests
module not found: javax.xml.bind
Do I need a newer version of maven? I can't find anything on the maven web site about JDK 10 version requirements.
It doesn't seem to be related to JavaFX. What am I missing?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
--add-modules
jaxb-api:2.3.0
The module name is java.xml.bind, not javax.xml.bind. In any case, I assume you don't need the
--add-modules
here as you are adding the JAXB API to the class path (you'll need to add the JAXB implementation and JAF too).– Alan Bateman
Jun 30 at 6:54
--add-modules
Where is the answer? If you mean stackoverflow.com/questions/43574426/… that give me different error.
– Dean Schulze
2 days ago
I removed the duplicate dependency and now have --add-modules java.se.ee per the SO link above. Now it gives
package com.sun.tools.internal.xjc.reader.xmlschema.bindinfo does not exist
– Dean Schulze
2 days ago
package com.sun.tools.internal.xjc.reader.xmlschema.bindinfo does not exist
Saw the link to the (incorrect) answer above. Nothing there works. Tried adding the dependencies in the middle of stackoverflow.com/questions/43574426/… but that gives the same error. Note that I'm using JDK 10, not JDK 9. JDK 10 seems to have created more problems with modules.
– Dean Schulze
2 days ago
Are you using the module path or just the classpath while compiling? And what's the idea behind
--add-modules
as well as an external dependency ofjaxb-api:2.3.0
? Btw maven 3.3.9 is almost 3 yrs old, why not try 3.5.x.– nullpointer
Jun 30 at 4:07