+ Start a Discussion

How to generate enterprise.jar?



I have tried to create enterprise.jar file. but i am getting the following error.


Location of the files:

D:\Program Files\Java\jdk1.6.0_30\lib---->wsc-22.jar



D:\Program Files\Java\jdk1.6.0_30\lib>java -classpath "D:\Program Files\Java\jdk
1.6.0_30\lib\wsc-22.jar" com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.ja
[WSC][wsdlc.run:312]Created temp dir: C:\DOCUME~1\abins9\LOCALS~1\Temp\wsdlc-tem
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Parse error: e
nterprise.wsdl (The system cannot find the file specified)
        at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:61)
        at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:75)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:312)
        at com.sforce.ws.tools.wsdlc.main(wsdlc.java:303)
Caused by: java.io.FileNotFoundException: enterprise.wsdl (The system cannot fin
d the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:58)
        ... 3 more

D:\Program Files\Java\jdk1.6.0_30\lib>



Give it more help to find the WSDL.  Your OS isnt searching the current directory by default


cd into the directory with your WSC22 jar and the wsdl

"C:\Program Files\Java\jdk1.6.0_32\bin\java" -classpath .\wsc-22.jar com.sforce.ws.tools.wsdlc .\enterprise.wsdl .\enterprise.jar



I should have clarified...

Its not searching that directory where you stored the files, so CD into that directory to run the command.

And in case OS is not seaching the current directory either.. use the ./ to tell it, the file is here..