I am using xjc ant task to generate java classes from xsd and wsdl and then i am generating a jar out of these generated classes. PFB the code i am using,
<!-- Below code generates java classes from wsdl -->
<exec executable="xjc">
<arg value="-wsdl" />
<arg value="${wsdl}/mysample.wsdl" />
<arg value="-d" />
<arg value="${myclasses}" />
<arg value="-d" />
<arg value="${myclasses}" />
<arg value="${xsdfile}/mysample.xsd" />
</exec>
<!-- Below code generates jar from java classes -->
<jar destfile="${jars}/mysample.jar" basedir="${myclasses}"/>
It works fine in my local with JDK7 but when i deploy it to my server which has jdk6 i am getting <pre>org.jboss.resteasy.spi.UnhandledException: java.lang.UnsupportedClassVersionError: com/my/webservices/mysampleweb
. Any suggestion how to make this work??
EDIT:
I am getting major version 51 is newer than 50, the highest major version supported by this compiler.
error for some classes which were generated from xsd. How to resolve this??
I checked my ANT_HOME,java version and jre everything is fine.. But still i am getting the above error when build using ant via command line.. Any suggestion