can not create a jar file using comp ...

Posted on 2006-05-11
Last Modified: 2008-03-10
Hi experts,

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

 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.
Question by:meow00
    LVL 86

    Expert Comment

    Put scomp binary directory in your PATH variable
    LVL 92

    Assisted Solution

    > 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

    LVL 1

    Author Comment

    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.
    LVL 92

    Expert Comment

    "Without an XSDCONFIG file, scomp uses the schema's type names and URI for classes and packages."
    LVL 1

    Author Comment

    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 CreateProcess: C:\xmlbeans-2.1.0\bin\javac @C:\DOCUME~1\Meow\LOCALS~1\Temp\javac24179 error=2
    null 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
            at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.j
            at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(
     mmm ... but this is what happen without using the *.xsdconfig

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

    Accepted Solution

    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
    LVL 1

    Author Comment

    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 ...
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    If you have upgraded to Java2 update 10 on a Microsoft Windows client, you may have discovered that your Java application does not work as it did before.  For example, the colors of your Java2D graphic may be all wrong for no apparent reason. Aft…
    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now