How get rt.jar dependencies in java 11?
We are planning to migrate our project from java 8(currently running on tomcat 7) to java 11, since rt.jar file is no longer available,
and tomcat startup needs classes from sun.misc package for instance,sun.misc.GC. Also, our application uses javax.xml.ws.WebServiceFeature.
we are getting no java.lang.NoClassDefFoundError and application fails to launch.
How to get this dependencies resolved in java 11?
java java-8 java-11 rt.jar
add a comment |
We are planning to migrate our project from java 8(currently running on tomcat 7) to java 11, since rt.jar file is no longer available,
and tomcat startup needs classes from sun.misc package for instance,sun.misc.GC. Also, our application uses javax.xml.ws.WebServiceFeature.
we are getting no java.lang.NoClassDefFoundError and application fails to launch.
How to get this dependencies resolved in java 11?
java java-8 java-11 rt.jar
5
You should not need to. All non-internal rt.jar dependencies should be available in the Java 11 JDK. And since there isn't a separate JRE anymore .... you either use a JDK or use jlink to create a custom distro.
– Stephen C
Nov 23 '18 at 6:06
4
If you are depending on internal APIs, you need to find replacements on a case-by-case basis.
– Stephen C
Nov 23 '18 at 6:07
4
too broad to say have some dependencies... got any specific use case to usert.jarexclusively? you should share that then so as to clarify why does the existing JDK not solve your use case.
– Naman
Nov 23 '18 at 6:07
2
I assume you just need to upgrade tom Tomcat 9. For JAX-WS then it just means moving to the standalone download, which you can find on Maven.
– Alan Bateman
Nov 23 '18 at 7:58
add a comment |
We are planning to migrate our project from java 8(currently running on tomcat 7) to java 11, since rt.jar file is no longer available,
and tomcat startup needs classes from sun.misc package for instance,sun.misc.GC. Also, our application uses javax.xml.ws.WebServiceFeature.
we are getting no java.lang.NoClassDefFoundError and application fails to launch.
How to get this dependencies resolved in java 11?
java java-8 java-11 rt.jar
We are planning to migrate our project from java 8(currently running on tomcat 7) to java 11, since rt.jar file is no longer available,
and tomcat startup needs classes from sun.misc package for instance,sun.misc.GC. Also, our application uses javax.xml.ws.WebServiceFeature.
we are getting no java.lang.NoClassDefFoundError and application fails to launch.
How to get this dependencies resolved in java 11?
java java-8 java-11 rt.jar
java java-8 java-11 rt.jar
edited Nov 23 '18 at 7:47
Shreya Prajapati
8411
8411
asked Nov 23 '18 at 5:59
Anoop DeshpandeAnoop Deshpande
485
485
5
You should not need to. All non-internal rt.jar dependencies should be available in the Java 11 JDK. And since there isn't a separate JRE anymore .... you either use a JDK or use jlink to create a custom distro.
– Stephen C
Nov 23 '18 at 6:06
4
If you are depending on internal APIs, you need to find replacements on a case-by-case basis.
– Stephen C
Nov 23 '18 at 6:07
4
too broad to say have some dependencies... got any specific use case to usert.jarexclusively? you should share that then so as to clarify why does the existing JDK not solve your use case.
– Naman
Nov 23 '18 at 6:07
2
I assume you just need to upgrade tom Tomcat 9. For JAX-WS then it just means moving to the standalone download, which you can find on Maven.
– Alan Bateman
Nov 23 '18 at 7:58
add a comment |
5
You should not need to. All non-internal rt.jar dependencies should be available in the Java 11 JDK. And since there isn't a separate JRE anymore .... you either use a JDK or use jlink to create a custom distro.
– Stephen C
Nov 23 '18 at 6:06
4
If you are depending on internal APIs, you need to find replacements on a case-by-case basis.
– Stephen C
Nov 23 '18 at 6:07
4
too broad to say have some dependencies... got any specific use case to usert.jarexclusively? you should share that then so as to clarify why does the existing JDK not solve your use case.
– Naman
Nov 23 '18 at 6:07
2
I assume you just need to upgrade tom Tomcat 9. For JAX-WS then it just means moving to the standalone download, which you can find on Maven.
– Alan Bateman
Nov 23 '18 at 7:58
5
5
You should not need to. All non-internal rt.jar dependencies should be available in the Java 11 JDK. And since there isn't a separate JRE anymore .... you either use a JDK or use jlink to create a custom distro.
– Stephen C
Nov 23 '18 at 6:06
You should not need to. All non-internal rt.jar dependencies should be available in the Java 11 JDK. And since there isn't a separate JRE anymore .... you either use a JDK or use jlink to create a custom distro.
– Stephen C
Nov 23 '18 at 6:06
4
4
If you are depending on internal APIs, you need to find replacements on a case-by-case basis.
– Stephen C
Nov 23 '18 at 6:07
If you are depending on internal APIs, you need to find replacements on a case-by-case basis.
– Stephen C
Nov 23 '18 at 6:07
4
4
too broad to say have some dependencies... got any specific use case to use
rt.jar exclusively? you should share that then so as to clarify why does the existing JDK not solve your use case.– Naman
Nov 23 '18 at 6:07
too broad to say have some dependencies... got any specific use case to use
rt.jar exclusively? you should share that then so as to clarify why does the existing JDK not solve your use case.– Naman
Nov 23 '18 at 6:07
2
2
I assume you just need to upgrade tom Tomcat 9. For JAX-WS then it just means moving to the standalone download, which you can find on Maven.
– Alan Bateman
Nov 23 '18 at 7:58
I assume you just need to upgrade tom Tomcat 9. For JAX-WS then it just means moving to the standalone download, which you can find on Maven.
– Alan Bateman
Nov 23 '18 at 7:58
add a comment |
2 Answers
2
active
oldest
votes
Tomcat 7 won't work with Java 11. You need to upgrade your application server to a newer version.
As the Tomcat team hasn't listed Java 11 compatibility for their products, your best bet is to take the latest release version and see if it works (hint, I did that last month and 9.0.12 works).
After that, you also need to see if your own application works under JDK 11, and whether it compiles.
Any errors you get, you need to find alternatives, often the same APIs are already available as Maven packages in the central repository.
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
add a comment |
For the other part of your question on where to find javax.xml.ws.WebServiceFeature in Java 11... it has been moved out of rt.jar and into a different project called Glassfish Metro.
Personally I found the Glassfish Metro page to be of little help, at least in regards to telling me how to add a dependency, but I eventually figured it out. For Maven add the following to your pom file. (Version 2.3.1 worked for me. It looks like the latest is version 2.4.3.)
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.3.1</version>
</dependency>
Info for other dependency management tools can be found at
https://mvnrepository.com/artifact/org.glassfish.metro/webservices-rt/2.3.1
https://search.maven.org/artifact/org.glassfish.metro/webservices-rt/2.3.1/jar
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53441334%2fhow-get-rt-jar-dependencies-in-java-11%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Tomcat 7 won't work with Java 11. You need to upgrade your application server to a newer version.
As the Tomcat team hasn't listed Java 11 compatibility for their products, your best bet is to take the latest release version and see if it works (hint, I did that last month and 9.0.12 works).
After that, you also need to see if your own application works under JDK 11, and whether it compiles.
Any errors you get, you need to find alternatives, often the same APIs are already available as Maven packages in the central repository.
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
add a comment |
Tomcat 7 won't work with Java 11. You need to upgrade your application server to a newer version.
As the Tomcat team hasn't listed Java 11 compatibility for their products, your best bet is to take the latest release version and see if it works (hint, I did that last month and 9.0.12 works).
After that, you also need to see if your own application works under JDK 11, and whether it compiles.
Any errors you get, you need to find alternatives, often the same APIs are already available as Maven packages in the central repository.
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
add a comment |
Tomcat 7 won't work with Java 11. You need to upgrade your application server to a newer version.
As the Tomcat team hasn't listed Java 11 compatibility for their products, your best bet is to take the latest release version and see if it works (hint, I did that last month and 9.0.12 works).
After that, you also need to see if your own application works under JDK 11, and whether it compiles.
Any errors you get, you need to find alternatives, often the same APIs are already available as Maven packages in the central repository.
Tomcat 7 won't work with Java 11. You need to upgrade your application server to a newer version.
As the Tomcat team hasn't listed Java 11 compatibility for their products, your best bet is to take the latest release version and see if it works (hint, I did that last month and 9.0.12 works).
After that, you also need to see if your own application works under JDK 11, and whether it compiles.
Any errors you get, you need to find alternatives, often the same APIs are already available as Maven packages in the central repository.
edited Nov 24 '18 at 16:04
Robert
25.1k1261107
25.1k1261107
answered Nov 23 '18 at 8:25
jwentingjwenting
3,74911625
3,74911625
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
add a comment |
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
It's frustrating that the compatibility grid in the Tomcat documentation is misleading with regard to Java. From looking at that you would reasonably assume that Tomcat 7 does work with Java 11 since the "Supported Java Versions" are shown as "6 and later".
– skomisa
Nov 25 '18 at 9:34
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
@skomisa It's not so much misleading as not updated for quite some time now.
– jwenting
Nov 25 '18 at 10:36
add a comment |
For the other part of your question on where to find javax.xml.ws.WebServiceFeature in Java 11... it has been moved out of rt.jar and into a different project called Glassfish Metro.
Personally I found the Glassfish Metro page to be of little help, at least in regards to telling me how to add a dependency, but I eventually figured it out. For Maven add the following to your pom file. (Version 2.3.1 worked for me. It looks like the latest is version 2.4.3.)
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.3.1</version>
</dependency>
Info for other dependency management tools can be found at
https://mvnrepository.com/artifact/org.glassfish.metro/webservices-rt/2.3.1
https://search.maven.org/artifact/org.glassfish.metro/webservices-rt/2.3.1/jar
add a comment |
For the other part of your question on where to find javax.xml.ws.WebServiceFeature in Java 11... it has been moved out of rt.jar and into a different project called Glassfish Metro.
Personally I found the Glassfish Metro page to be of little help, at least in regards to telling me how to add a dependency, but I eventually figured it out. For Maven add the following to your pom file. (Version 2.3.1 worked for me. It looks like the latest is version 2.4.3.)
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.3.1</version>
</dependency>
Info for other dependency management tools can be found at
https://mvnrepository.com/artifact/org.glassfish.metro/webservices-rt/2.3.1
https://search.maven.org/artifact/org.glassfish.metro/webservices-rt/2.3.1/jar
add a comment |
For the other part of your question on where to find javax.xml.ws.WebServiceFeature in Java 11... it has been moved out of rt.jar and into a different project called Glassfish Metro.
Personally I found the Glassfish Metro page to be of little help, at least in regards to telling me how to add a dependency, but I eventually figured it out. For Maven add the following to your pom file. (Version 2.3.1 worked for me. It looks like the latest is version 2.4.3.)
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.3.1</version>
</dependency>
Info for other dependency management tools can be found at
https://mvnrepository.com/artifact/org.glassfish.metro/webservices-rt/2.3.1
https://search.maven.org/artifact/org.glassfish.metro/webservices-rt/2.3.1/jar
For the other part of your question on where to find javax.xml.ws.WebServiceFeature in Java 11... it has been moved out of rt.jar and into a different project called Glassfish Metro.
Personally I found the Glassfish Metro page to be of little help, at least in regards to telling me how to add a dependency, but I eventually figured it out. For Maven add the following to your pom file. (Version 2.3.1 worked for me. It looks like the latest is version 2.4.3.)
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.3.1</version>
</dependency>
Info for other dependency management tools can be found at
https://mvnrepository.com/artifact/org.glassfish.metro/webservices-rt/2.3.1
https://search.maven.org/artifact/org.glassfish.metro/webservices-rt/2.3.1/jar
edited Jan 29 at 0:10
answered Jan 28 at 23:52
HairOfTheDogHairOfTheDog
1,04311525
1,04311525
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53441334%2fhow-get-rt-jar-dependencies-in-java-11%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
5
You should not need to. All non-internal rt.jar dependencies should be available in the Java 11 JDK. And since there isn't a separate JRE anymore .... you either use a JDK or use jlink to create a custom distro.
– Stephen C
Nov 23 '18 at 6:06
4
If you are depending on internal APIs, you need to find replacements on a case-by-case basis.
– Stephen C
Nov 23 '18 at 6:07
4
too broad to say have some dependencies... got any specific use case to use
rt.jarexclusively? you should share that then so as to clarify why does the existing JDK not solve your use case.– Naman
Nov 23 '18 at 6:07
2
I assume you just need to upgrade tom Tomcat 9. For JAX-WS then it just means moving to the standalone download, which you can find on Maven.
– Alan Bateman
Nov 23 '18 at 7:58