You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by xm...@xml.apache.org on 2004/05/27 20:03:00 UTC

[Apache XMLBeans Wiki] Updated: XmlBeansV1Faq

   Date: 2004-05-27T11:03:00
   Editor: 63.96.168.235 <>
   Wiki: Apache XMLBeans Wiki
   Page: XmlBeansV1Faq
   URL: http://wiki.apache.org/xmlbeans/XmlBeansV1Faq

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -16,6 +16,7 @@
    * [#buildingXMLBeansV1 How do I build XMLBeans V1 from source?]
    * [#viewXMLBeansOnline Can I view the XMLBeans Source Code online, without having CVS on my machine?]
    * [#viewJavaDoc Is the XMLBeans V1 javadoc available online?]
+   * [#scompFindingJavac The scomp program can't find javac and fails with java.io.IOException on Windows!]
 
  * '''[#generalXbeans General XMLBeans Questions]'''
    * [#javaType4SchemaTypes What Java types are created for a particular schema type?]
@@ -87,6 +88,33 @@
 '''Is the XMLBeans V1 javadoc available online?'''
 
 Yes, you can view the XMLBeans V1 JavaDoc here, http://xml.apache.org/xmlbeans/docs/reference/index.html.
+----
+[[Anchor(scompFindingJavac)]]
+'''The scomp program can't find javac and fails with java.io.IOException on Windows!'''
+
+On Windows, some users have reported that the scomp program fails when trying to run javac on the generated java source.  First, be sure you have a JDK installed.  The JRE doesn't have the javac program so you won't be able to compile the generated java source.  If you have both a JDK and a JRE installed, the JRE's java is being found before the JDK's java.  Since scomp uses the 'java.home' property to find the javac program, but javac is only available in the JDK, finding javac will fail.
+
+The solution is to move the JDK higher up on the PATH in the environment.  An alternate solution is to set JAVA_HOME and edit the scomp script to run %JAVA_HOME%/bin/java instead of relying on the PATH.    The error you would see looks like:
+
+{{{
+$ scomp -out myeasypo.jar easypo
+Time to build schema type system: 1.969 seconds
+Time to generate code: 0.313 seconds
+'javac' is required on the path.
+java.io.IOException: CreateProcess: c:\xmlbeans-1.0.2\schemas\javac @c:\DOCUME~1\alex\LOCALS~1\Temp\javac20992 error=2
+null
+java.io.IOException: CreateProcess: c:\xmlbeans-1.0.2\schemas\javac @c:\DOCUME~1\alex\LOCALS~1\Temp\javac20992 error=2
+        at java.lang.Win32Process.create(Native Method)
+        at java.lang.Win32Process.<init>(Unknown Source)
+        at java.lang.Runtime.execInternal(Native Method)
+        at java.lang.Runtime.exec(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.java:218)
+        at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:815)
+        at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:264)
+BUILD FAILED
+}}}
 ----
 [[Anchor(buildingXMLBeansV1)]]
 '''How do I build XMLBeans V1?'''

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org