--add-modules flag replacement for Java11 [duplicate]
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.
java maven google-cloud-pubsub java-11
marked as duplicate by nullpointer
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.
add a comment |
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.
java maven google-cloud-pubsub java-11
marked as duplicate by nullpointer
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 usingjava -cp
as detailed here, so as not having to go through the pom.xml and mvn.
– eddiemalou
Jan 1 at 21:28
add a comment |
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.
java maven google-cloud-pubsub java-11
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
java maven google-cloud-pubsub java-11
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
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
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 usingjava -cp
as detailed here, so as not having to go through the pom.xml and mvn.
– eddiemalou
Jan 1 at 21:28
add a comment |
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 usingjava -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
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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