?
Solved

can not create a jar file using comp ...

Posted on 2006-05-11
8
Medium Priority
?
1,516 Views
Last Modified: 2008-03-10
Hi experts,

   Can anyone please tell me why I can not create a jar file using scomp ? thanks.
------------------------------------------

C:\xmlbeans-2.1.0\schemas>dir
 Volume in drive C has no label.
 Volume Serial Number is 9817-6CD4

 Directory of C:\xmlbeans-2.1.0\schemas

05/11/2006  11:42 AM    <DIR>          .
05/11/2006  11:42 AM    <DIR>          ..
11/07/2005  02:26 PM             1,536 easypo.xsd
11/07/2005  02:26 PM             1,105 easypo.xsdconfig
11/07/2005  02:26 PM             1,019 nameworld.xsd
11/07/2005  02:26 PM             1,463 numerals.xsd
05/11/2006  11:42 AM    <DIR>          s4s
               4 File(s)          5,123 bytes
               3 Dir(s)  137,882,402,816 bytes free

C:\xmlbeans-2.1.0\schemas>scomp -out myeasypo.jar easypo
'scomp' is not recognized as an internal or external command,
operable program or batch file.
0
Comment
Question by:meow00
  • 3
  • 3
  • 2
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 16662468
Put scomp binary directory in your PATH variable
0
 
LVL 92

Assisted Solution

by:objects
objects earned 450 total points
ID: 16663237
> scomp -out myeasypo.jar easypo

try specifying the full pag to scomp, eg. if the executable is in /scomp/bin you'd use:

/scomp/bin/scomp -out myeasypo.jar easypo

0
 
LVL 1

Author Comment

by:meow00
ID: 16663402
thanks ... it is semi-working now ...
since I am using xmlbeans 2.1.0 ...
it works as:

C:\xmlbeans-2.1.0\bin>scomp -out myeasypo.jar easypo.xsd -compiler C:/jdk1.5.0_0 6\bin\javac easypo.xsdconfig
then it creates the jar file!

However, some *.xsd files do not have the corresponding *.xsdconfig file ...
what do I do in this case ? thanks.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 16663443
"Without an XSDCONFIG file, scomp uses the schema's type names and URI for classes and packages."
0
 
LVL 1

Author Comment

by:meow00
ID: 16663499
C:\xmlbeans-2.1.0\bin>scomp -out myeasypo.jar easypo.xsd
Time to build schema type system: 0.875 seconds
Time to generate code: 0.188 seconds
java.io.IOException: CreateProcess: C:\xmlbeans-2.1.0\bin\javac @C:\DOCUME~1\Meow\LOCALS~1\Temp\javac24179 error=2
null
java.io.IOException: CreateProcess: C:\xmlbeans-2.1.0\bin\javac @C:\DOCUME~1\Meow\LOCALS~1\Temp\javac24179 error=2
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        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
.java:231)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.j
ava:1126)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java
:368)
BUILD FAILED
C:\xmlbeans-2.1.0\bin>
-----------------------------------
 mmm ... but this is what happen without using the *.xsdconfig

 I can not get a jar file at all!
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 600 total points
ID: 16665553
Your program probably can't find a file

>>C:\xmlbeans-2.1.0\bin>scomp -out myeasypo.jar easypo.xsd

Moving into the bin directory is a poor solution. Look up "Environment Variables" in Windows help. This will show you how to set the PATH to include C:\xmlbeans-2.1.0\bin

To avoid any problems pass the full paths of those file parameters to scomp
0
 
LVL 1

Author Comment

by:meow00
ID: 16671224
thanks all ... problem solved ... it works in a unix/linux machine ... but not on window ... probably because some strings are too long ...
create the jar in linux and move to window ...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16673783
:-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question