This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes package javax.jws does not exist error on unix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "package javax.jws does not exist error on unix" Watch "package javax.jws does not exist error on unix" New topic
Author

package javax.jws does not exist error on unix

Mahita Ande
Greenhorn

Joined: Sep 26, 2012
Posts: 16
Hi,
I have a java WebService. The code compiles fine in eclipse. When I try to compile this in java 1.5 I get the error' package javax.jws does not exist' and 'package javax.xml.ws does not exist'. When I try to compile it on a unix machine from the command line using javac i get the error. When I compile the same code on another unix machine running java 1.6 everything works just fine. Could you please advise what I am missing.

Thank you,
Mahita
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17148
    
  27

The javax.jws package is not part of the core JVM class package set, it's part of J2EE. So you need to add a J2EE library to the classpath of your compile. That's not actually a Unix-only issue. The same applies to any Java compile on any OS. It's just that in the case of using Eclipse, the classpath additions had been done to your Eclipse project definition.


An IDE is no substitute for an Intelligent Developer.
Mahita Ande
Greenhorn

Joined: Sep 26, 2012
Posts: 16
Thank you.

Also, I am creating jaxws files using wsgen that is available in jdk1.7 in the ant script. Because of this I am not able to run the service on servers which have earlier versions of java. I tried to specify the target to 1.5 for wsgen but it did not work. When i look up to see if I have wsgen in jdk1.5.0_16 I cannot find it. Could you please advise how I can use wsgen to generate target files for java 1.5 and why I cannot find wsgen in jdk1.5.0_16/bin.
Mahita Ande
Greenhorn

Joined: Sep 26, 2012
Posts: 16
My java build path points to jre1.6, I use wsgen in my ant file. but its version is JAX-WS 2.2.4. I was the wsgen to be 2.1. Please advise how can I force wsgen to use JAX-WS 2.1 in my ant file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: package javax.jws does not exist error on unix
 
It's not a secret anymore!