Results 1 to 2 of 2

Thread: jdk problem?

  1. #1
    JordanParfitt is offline Member
    Join Date
    Oct 2008
    Posts
    3
    Rep Power
    0

    Default jdk problem?

    I started a new job and uploaded a new project. I keep getting the following error and am not sure why as I have not used Java (or NetBeans).

    Here is the error:
    13: taskdef class com.sun.tools.ws.ant.WsGen cannot be found
    BUILD FAILED (total time: 1 second)

    Here is the code:
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns:xalan="xml.apache.org/xslt" xmlns:webproject2="netbeans.org/ns/web-project/2" xmlns:jaxws="netbeans.org/ns/jax-ws/1">
    <!--
    ===================
    JAX-WS WSIMPORT SECTION
    ===================
    -->
    <target name="wsgen-init" depends="init, -do-compile">
    <mkdir dir="${build.generated.dir}/wsgen/service"/>
    <mkdir dir="${build.generated.dir}/wsgen/service/resources/"/>
    <mkdir dir="${build.generated.dir}/wsgen/binaries"/>
    <mkdir dir="${build.classes.dir}"/>
    <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
    <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsg en.classpath}:${javac.classpath}"/>
    </taskdef>
    </target>
    <target name="wsgen-emmaGeocoding" depends="wsgen-init">
    <wsgen fork="true" xendorsed="true" sourcedestdir="${build.generated.dir}/wsgen/service" resourcedestdir="${build.generated.dir}/wsgen/service/resources/" destdir="${build.generated.dir}/wsgen/binaries" keep="true" genwsdl="true" sei="edu.towson.cgis.EMMA.emmaGeocoding">
    <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsg en.classpath}:${javac.classpath}"/>
    <jvmarg value="-Djava.endorsed.dirs=${jaxws.endorsed.dir}"/>
    </wsgen>
    </target>
    <target name="wsgen-service-compile" depends="wsgen-emmaGeocoding">
    <webproject2:javac srcdir="${build.generated.dir}/wsgen/service" classpath="${j2ee.platform.wsimport.classpath}:${j avac.classpath}" destdir="${build.classes.dir}"/>
    </target>
    </project>

    I think my jdks are out of date. Does anyone have a suggestion on how to update this?

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    As the error message says, compiler cannot find the class com.sun.tools.ws.ant.WsGen which you are using in that application. It's not a problem with the JDK you have installed.

    From where you find this code, I think it's not written by you. That code use some extra packages/APIs, com.sun.tools.* is the one. It's not a standard package for JDK. So what you have to do is, find that package and add it into the class path and use.

    Again, this is not an issue with the JDK.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •