|
Sorry to jump in the middle here, but this works on my machine... if it helps.... I don't really see anything different between your's and mine. RUNJVA CLASS(xsp.xspVectorSQL) CLASSPATH(*ENVVAR) Where the *envvar = :/javaapps:/javaapps/jtds-1.2.jar Michael Schutte Admin Professional Bob Evans Farms, Inc. For hotcake tips, interviews with our chefs and more, check out the Stacked and Stuffed blog at http://imstuffed.blogspot.com java400-l-bounces@xxxxxxxxxxxx wrote on 02/13/2007 10:00:56 AM:
Larry, Your understanding is correct and we have made some progress. To answer your question UploadLockBox is in a package called lockBox. So based on what you said I tried changing my RUNJVA statement to the following(actually several variations) RUNJVA CLASS(lockBox.UploadLockBox) CLASSPATH('/QIBM/ProdData/Java400/:/QIBM/ProdData/Java400/jt400.jar') PROP((java.version '1.4')) OPTION(*NONE) RUNJVA CLASS(lockBox.UploadLockBox) CLASSPATH('/QIBM/ProdData/Java400/:/QIBM/ProdData/jt400.jar') PROP((java.version '1.4')) OPTION(*NONE) RUNJVA CLASS(lockBox.UploadLockBox) CLASSPATH('/QIBM/ProdData/Java400/:/QIBM/ProdData/Java400/lockBox/jt400. jar') PROP((java.version '1.4')) OPTION(*NONE) RUNJVA CLASS(lockBox.UploadLockBox) CLASSPATH('/QIBM/ProdData/Java400/:/QIBM/ProdData/Java400/') PROP((java.version '1.4')) OPTION(*NONE) All of which now give me java.lang.ClassNotFoundException: com/ibm/as400/access/AS400JDBCDriver So I am fairly certain means its not finding my jt400.jar file, but I've tried all numerous combinations. If you would be so kind, would you write the RUNJVA command as you think it should look based on what we know. Michael Smith iSeries.mySeries. -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Larry Ducie Sent: Monday, February 12, 2007 6:08 PM To: java400-l@xxxxxxxxxxxx Subject: RE: RUNJVA problems Mike, I hope I have tihs correct - you have your directories as follows: -Root File System -QIBM -ProdData -Java400 -lockBox ConnectDB2.class ConnectDB2.java UpLoadLockBox.class UpLoadLockBox.java Hello.class exists within the Java400 folder. Jt400.jar exists within the Java400 folder. You ran this successfully: RUNJVA CLASS(Hello) CLASSPATH('/QIBM/ProdData/Java400') PROP((java.version '1.4')) OPTION(*NONE) You then: exported from WDSC to /QIBM/ProdData/Java400/lockBox your java programs. UploadLockBox and ConnectDB2 and copied jt400.jar to /QIBM/ProdData/Java400 Then: You tried to run this command: RUNJVA CLASS(UploadLockBox) CLASSPATH('/QIBM/ProdData/Java400/lockBox:/QIBM/ProdData/Java400/jt400.j ar') PROP((java.version '1.4')) OPTION(*NONE) and get: java.lang.NoClassDefFoundError Question: Is your class in a package? If yes, and th package name is lockBoxc then your class is really called lockBox.UploadLockBox. If so, then you need to include the directory which contains the directory "lockBox" in your class path not the directory which contains your class file. The class loader locates classes by appending the full packaged name to the classpath entries and looking in the file system for the .class object. If your class has a package name of lockBox then it wont be found unless you include /QIBM/ProdData/Java400 in your classpath (in place of /QIBM/ProdData/Java400/lockBox). Example - for a class within the following package: com.package.name You would need to place that class in a directory structure of:- - com - package - name Your class would go into name. You then point the classpath to the parent directory of com OR zip them all into a jar file and point the classpath to the directory which contains the jar file. This way, the classpath PLUS the full packaged name will locate the directory which contains your class. It can then be loaded. This may or may not help. I hope it does. Cheers Larry Ducie -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l. -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.