Score:0

package javax.jws does not exist. JDK 1.7

sm flag
rsn

I am trying to run an old maven project, a Website Application from my company, so I can do some changes for an update. Currently, I'm still making some changes in pom.xml file because some library is not available in the repository. And after some configuration, I've been stuck in this error while I try to run the project using Tomcat Server 7 with JDK 1.7. It is showing that:

error: package javax.jws does not exist import javax.jws.WebMethod;

error: package javax.jws does not exist import javax.jws.WebService;

so I search and found this: https://askubuntu.com/a/1149525/1644122

<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-ri</artifactId>
  <version>2.3.0</version>
  <type>pom</type>
</dependency>

I have add this library and it went well when I build it using maven. But, this error appears when I do "run on server" in eclipse.

Unsupported major.minor version 52.0 (unable to load class [com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer])

I believe that the dependency that I add before require JDK 1.8 or above to run. The problem is, I need to to make it run in our tomcat server for a development environtment.

Now, the question is, Is there library that includes package javax.jws and support JDK 1.7?

Or Is there any way to handle this issue?

I'm newbie in Java. This project really driving me crazy :(

Please help me.

guiverc avatar
cn flag
You've provided no OS/product/release details; so currently we're limited in any help we can offer. What are you running?
rsn avatar
sm flag
rsn
I edit my question a little bit. I'm not really sure what "OS/product/release" means. Could you please explain a little bit what I need to provide? I'm running a Web application.
guiverc avatar
cn flag
Please refer https://askubuntu.com/help/on-topic, Ubuntu and official *flavors* of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes, this is not a programming Q&A site.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.