When
Requires Free Membership to View
But when I try to create a sap.jar file, by including my manifest file, all class files and my sapjco.jar file, it does produce the jar file. However, I cannot execute the jar file. It executes the program up to a point and then I get the run-time error: "Exception in thread "main"
java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO
at batchscan.<init>(batchscan.java:38)
at batchscan.main(batchscan.java:362)"
My classpath is already set corrcetly.
Depending on the type of Java archive you are creating, you will need to organize the directory structure in a specific manner. One of the most common Java archive type is the WAR file, or Web Application Archive. The WAR file contains a specific directory structure that allows you to easily access other stored archives (i.e. sapjco.jar). In order to access any Java jar, the WAR structure must have this path: /WEB-INF/lib with the lib directory containing sapjco.jar. Any jar files in this directory can be automatically used by another class in the Web application without having to worry about the CLASSPATH setting.
This was first published in November 2003

Join the conversationComment
Share
Comments
Results
Contribute to the conversation