--add-modules flag replacement for Java11 [duplicate]












0
















This question already has an answer here:




  • Replacements for deprecated JPMS modules with Java EE APIs

    6 answers



  • How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

    19 answers




I have the same error as described on this Google Discussion, ie. the push subscriptions of the google cloud emulator for the pubsub service aren't working and raise a:



java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter



The solution proposed in this thread is to use the --add-modules flag:



java ... --add-modules ...



but this is no longer possible in Java11.



So I followed up to see how to replace this --add-modules flag, but now I have to edit a pom.xml file and use maven to add the new dependencies. I looked up some maven plugin commands like mvn exec:java, because I am not sure how to rebuild the project and would just like to run my:



java -jar cloud-pubsub-emulator-0.1-SNAPSHOT-all.jar ...



by adding the necessary dependencies that would substitute the --add-modules flag.



PS: I tried to downgrade to Java version < 11 and re-install the pubsub emulator, but another error was raised, so I decided to stick with Java's latest version.










share|improve this question















marked as duplicate by nullpointer java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 1 at 5:35


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.



















  • Right, --add-modules has not been removed. Instead, the question is about the java.xml.bind module which was deprecated-for-removal in Java SE 9 and eventually removed in Java SE 11. JEP 320 has all the details. The standalone version of JAXB is published in Maven so shouldn't be too hard to migrate and it shouldn't require any changes to java code.

    – Alan Bateman
    Jan 1 at 8:19











  • Thanks so much, I have finally worked it out using the .jar files as specified in this answer and using java -cp as detailed here, so as not having to go through the pom.xml and mvn.

    – eddiemalou
    Jan 1 at 21:28


















0
















This question already has an answer here:




  • Replacements for deprecated JPMS modules with Java EE APIs

    6 answers



  • How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

    19 answers




I have the same error as described on this Google Discussion, ie. the push subscriptions of the google cloud emulator for the pubsub service aren't working and raise a:



java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter



The solution proposed in this thread is to use the --add-modules flag:



java ... --add-modules ...



but this is no longer possible in Java11.



So I followed up to see how to replace this --add-modules flag, but now I have to edit a pom.xml file and use maven to add the new dependencies. I looked up some maven plugin commands like mvn exec:java, because I am not sure how to rebuild the project and would just like to run my:



java -jar cloud-pubsub-emulator-0.1-SNAPSHOT-all.jar ...



by adding the necessary dependencies that would substitute the --add-modules flag.



PS: I tried to downgrade to Java version < 11 and re-install the pubsub emulator, but another error was raised, so I decided to stick with Java's latest version.










share|improve this question















marked as duplicate by nullpointer java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 1 at 5:35


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.



















  • Right, --add-modules has not been removed. Instead, the question is about the java.xml.bind module which was deprecated-for-removal in Java SE 9 and eventually removed in Java SE 11. JEP 320 has all the details. The standalone version of JAXB is published in Maven so shouldn't be too hard to migrate and it shouldn't require any changes to java code.

    – Alan Bateman
    Jan 1 at 8:19











  • Thanks so much, I have finally worked it out using the .jar files as specified in this answer and using java -cp as detailed here, so as not having to go through the pom.xml and mvn.

    – eddiemalou
    Jan 1 at 21:28
















0












0








0









This question already has an answer here:




  • Replacements for deprecated JPMS modules with Java EE APIs

    6 answers



  • How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

    19 answers




I have the same error as described on this Google Discussion, ie. the push subscriptions of the google cloud emulator for the pubsub service aren't working and raise a:



java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter



The solution proposed in this thread is to use the --add-modules flag:



java ... --add-modules ...



but this is no longer possible in Java11.



So I followed up to see how to replace this --add-modules flag, but now I have to edit a pom.xml file and use maven to add the new dependencies. I looked up some maven plugin commands like mvn exec:java, because I am not sure how to rebuild the project and would just like to run my:



java -jar cloud-pubsub-emulator-0.1-SNAPSHOT-all.jar ...



by adding the necessary dependencies that would substitute the --add-modules flag.



PS: I tried to downgrade to Java version < 11 and re-install the pubsub emulator, but another error was raised, so I decided to stick with Java's latest version.










share|improve this question

















This question already has an answer here:




  • Replacements for deprecated JPMS modules with Java EE APIs

    6 answers



  • How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

    19 answers




I have the same error as described on this Google Discussion, ie. the push subscriptions of the google cloud emulator for the pubsub service aren't working and raise a:



java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter



The solution proposed in this thread is to use the --add-modules flag:



java ... --add-modules ...



but this is no longer possible in Java11.



So I followed up to see how to replace this --add-modules flag, but now I have to edit a pom.xml file and use maven to add the new dependencies. I looked up some maven plugin commands like mvn exec:java, because I am not sure how to rebuild the project and would just like to run my:



java -jar cloud-pubsub-emulator-0.1-SNAPSHOT-all.jar ...



by adding the necessary dependencies that would substitute the --add-modules flag.



PS: I tried to downgrade to Java version < 11 and re-install the pubsub emulator, but another error was raised, so I decided to stick with Java's latest version.





This question already has an answer here:




  • Replacements for deprecated JPMS modules with Java EE APIs

    6 answers



  • How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

    19 answers








java maven google-cloud-pubsub java-11






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 4:49









Jorn Vernee

20.6k33760




20.6k33760










asked Jan 1 at 4:33









eddiemaloueddiemalou

6114




6114




marked as duplicate by nullpointer java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 1 at 5:35


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.









marked as duplicate by nullpointer java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 1 at 5:35


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.















  • Right, --add-modules has not been removed. Instead, the question is about the java.xml.bind module which was deprecated-for-removal in Java SE 9 and eventually removed in Java SE 11. JEP 320 has all the details. The standalone version of JAXB is published in Maven so shouldn't be too hard to migrate and it shouldn't require any changes to java code.

    – Alan Bateman
    Jan 1 at 8:19











  • Thanks so much, I have finally worked it out using the .jar files as specified in this answer and using java -cp as detailed here, so as not having to go through the pom.xml and mvn.

    – eddiemalou
    Jan 1 at 21:28





















  • Right, --add-modules has not been removed. Instead, the question is about the java.xml.bind module which was deprecated-for-removal in Java SE 9 and eventually removed in Java SE 11. JEP 320 has all the details. The standalone version of JAXB is published in Maven so shouldn't be too hard to migrate and it shouldn't require any changes to java code.

    – Alan Bateman
    Jan 1 at 8:19











  • Thanks so much, I have finally worked it out using the .jar files as specified in this answer and using java -cp as detailed here, so as not having to go through the pom.xml and mvn.

    – eddiemalou
    Jan 1 at 21:28



















Right, --add-modules has not been removed. Instead, the question is about the java.xml.bind module which was deprecated-for-removal in Java SE 9 and eventually removed in Java SE 11. JEP 320 has all the details. The standalone version of JAXB is published in Maven so shouldn't be too hard to migrate and it shouldn't require any changes to java code.

– Alan Bateman
Jan 1 at 8:19





Right, --add-modules has not been removed. Instead, the question is about the java.xml.bind module which was deprecated-for-removal in Java SE 9 and eventually removed in Java SE 11. JEP 320 has all the details. The standalone version of JAXB is published in Maven so shouldn't be too hard to migrate and it shouldn't require any changes to java code.

– Alan Bateman
Jan 1 at 8:19













Thanks so much, I have finally worked it out using the .jar files as specified in this answer and using java -cp as detailed here, so as not having to go through the pom.xml and mvn.

– eddiemalou
Jan 1 at 21:28







Thanks so much, I have finally worked it out using the .jar files as specified in this answer and using java -cp as detailed here, so as not having to go through the pom.xml and mvn.

– eddiemalou
Jan 1 at 21:28














0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

A Topological Invariant for $pi_3(U(n))$