× 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.



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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.