If I'm not mistaken, the 'old error' you reference is not an XMLBeans
error at all. This appears to be an environment error with the
installation of Java. You have set the JAVA_HOME environment variable to
your <Java Install>\bin. Have you also added %JAVA_HOME%\bin to your
PATH before the JRE bin? With javac not being found in xmlbeans-2.4.0,
that makes me believe the PATH does not include your JDK. Can you run
javac yourself from a command line?

 

One other problem that I had experienced in the early Java days was the
default installation for Java on Windows was C:\Program Files\Java. The
space in the path was a problem with some paths not to mention the
additional length. I got into the habit of putting my JDK's and JRE's in
a location that was simpler and shorter, C:\java\jdk<ver>. The FAQ does
reference trying 8.3 (non-space) names for the Java installation.

 

From: Jerry Brown [mailto:jbr...@dvierow.com] 
Sent: Wednesday, September 16, 2009 8:25 PM
To: user@xmlbeans.apache.org
Subject: Re: scomp fails trying javac

 

 As I said this is an 'old' error.  A response is in the FAQ.  I looked
up where the error occured in the java code statements 373, 1154, and
231,  It is trying to compile but can't.  There is no javac program in
directory xmlbeans-2.4.0; it is in %JAVA_HOME%\bin where it is supposed
to be.  "the JRE's java is being found before the JDK's java" .. that is
what the 'old' error solution is asserting.   My %JAVA_HOME% is correct,
but apparently it is not being searched first.  Thanks for the previous
responses because they helped me to focus on the real problem. Any
ideas? 

------------------------------------------------------------------------
------------------------------------------------------------------------
-------------

C:\xmlbeans-2.4.0>scomp -out tutorials\gettingstarted\lib\easypo.jar
schemas\easypo.xsd
Time to build schema type system: 1.672 seconds
Time to generate code: 0.203 seconds
java.io.IOException: Cannot run program "C:\xmlbeans-2.4.0\javac":
CreateProcess error=2, The system
 cannot find the file specified
java.io.IOException: CreateProcess error=2, The system cannot find the
file specified
java.io.IOException: Cannot run program "C:\xmlbeans-2.4.0\javac":
CreateProcess error=2, The system
 cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at
org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.ja
va:231)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java
:1154)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:37
3)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot
find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 6 more
BUILD FAILED
C:\xmlbeans-2.4.0>

------------------------------------------------------------------------
------------------------------------------------------------------------
------------

jerry brown

______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole 
use of the intended recipient and may contain confidential and privileged 
information. Any unauthorized review or use, including disclosure or 
distribution, is prohibited. If you are not the intended recipient, please 
contact the sender and destroy all copies of this email.

Reply via email to