× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.jar') 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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.