1
  1. JAXB 1.5 installed under C:\Sun\jwsdp-1.5
  2. J2SE 1.4.2 installed under C:\j2sdk1.4.2_08
  3. copied sample.xsd file to C:\Sun\jwsdp-1.5\jaxb\bin
  4. went to C:\Sun\jwsdp-1.5\jaxb\bin and ran xjc.bat -p com.package sample.xsd
  5. got error message: Unrecognized option: -p Could not create the Java virtual machine.

Please help me out, thanks a lot

4
  • out of curiousity: why 1.4.2 ? Commented Jan 20, 2010 at 22:19
  • it is pretty old app. I am not allowed to make decision to move forward:(( Commented Jan 20, 2010 at 22:46
  • You have JWSDP 1.5, not JAXB 1.5. Your JAXB version is 1.0.x. Commented Jan 20, 2010 at 23:08
  • You could try editing xjc.bat and remove the -p option and see what happens... Commented Jan 21, 2010 at 3:01

3 Answers 3

2

This page seems to indicate tha xjc.bat needs Java 1.5+ :

http://forums.sun.com/thread.jspa?threadID=5359378

Sign up to request clarification or add additional context in comments.

2 Comments

it is pretty old app. I am not allowed to make decision to move forward:((
This was the command issued: xjc.bat -p com.package sample.xsd and I had JAVA_HOME printed and got error C:\j2sdk1.4.2_08 Unrecognized option: -p Could not create the Java virtual machine.
2

The last JAXB version that is compatible with java 1.4.2 is JAXB 1.0.6. I've never heard of a version 1.5... Where did you get it?

Edit

This error message is not generated by jaxb but by the JVM. Looks like, the jvm thinks, the '-p' parameter is a jvm parameter. Here's another page where the same error message was generated at a simple java --version call.

And another explanation for the error.

2 Comments

JWSDP 1.5 is a bundle of XML-related APIs, including JAXB 1.0. The version numbers are not comparable.
Sorry, I am new to this area. I mean Java Web Services Developer Pack 1.5. and got it from java.sun.com/webservices/downloads/1.5/index.html
0

I faced the similar problem and I resolved it using the following approach. I specified Jdk1.5 as the JDK while installing jwsdp1.5. But the system had jdk1.4 also installed. So I created the following batch file:

set JAVA_HOME=D:\apps\BEA\Weblogic\jdk150_04
set ANT_HOME=H:\Sun\jwsdp-1.5\apache-ant
set JWSDP_HOME=H:\Sun\jwsdp-1.5
set PATH=%JAVA_HOME%\bin;%PATH%;
%JWSDP_HOME%\jaxb\bin\xjc -p package -dtd sample.dtd

This resolved the error. Alternatively we can remove the Jdk1.4 path in the PATH environment variable, in that case, we need to write the batch file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.