|
The jt400 jar is for when you run the programs on a machine that is not an iSeries and access an iSeries. The Native (of which I believe the ntv version to be also) is for running on the iSeries as it is optimized for the iSeries. If you program is running on the iSeries only use the Native jar in the classpath. HTH Kristen > -----Original Message----- > From: java400-l-bounces@xxxxxxxxxxxx > [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kelly Cookson > Sent: Saturday, May 20, 2006 11:14 AM > To: Java Programming on and around the iSeries / AS400 > Subject: Program can't find toolbox classes on the iSeries > > I'm trying to run a simple java program containing jt400.jar > access classes on the iSeries. > > I have the jt400.jar, the jt400ntv.jar, and the > jt400Native.jar files in the /QIBM/ProdData/Java400 > directory. I have also tried with just one these jar files in > the directory. > > I used WRKENVVAR to set the CLASSPATH enviornmental variable > to each of the following: > > '.:/QIBM/ProdData/Java400/jt400.jar' > '/QIBM/ProdData/Java400/jt400.jar' > '.:/QIBM/ProdData/Java400/jt400ntv.jar' > '/QIBM/ProdData/Java400/jt400ntv.jar' > '.:/QIBM/ProdData/Java400/jt400Native.jar' > '/QIBM/ProdData/Java400/jt400Native.jar' > > I have also tried these same classpaths as parameters in the > JAVA command from the command line. > > No matter what I do, I get an error saying: > > java.lang.NoClassDefFoundError: > com/ibm/as400/access/AS400 > at java.lang.Throwable.<init>(Throwable.java:195) > > at java.lang.Error.<init>(Error.java:49) > > at > java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.jav > a:40) > > at ExtolCl.callProgram(ExtolCl.java:9) > > at ExtolCl.main(ExtolCl.java:29) > > Java program completed with exit code 1 > > > It's finding and executing the class I wrote (ExtolCl), which > is also in the /QIBM/ProdData/Java400 directory. It doesn't > seem to be able to find the toolbox classes. > > What am I missing??? Here's the source code for the program, > if that helps: > > import com.ibm.as400.access.*; > public class ExtolCl { > public String errorParm = ""; > public void callProgram() { > try { > AS400 system = new AS400("mysystem", "myname", "mypassword"); > ProgramCall pgm = new ProgramCall(system); > String program = "/QSYS.LIB/EXTOL.LIB/EXTOLCL.PGM"; > ProgramParameter[] parameterList = new ProgramParameter[1]; > parameterList[0] = new ProgramParameter(1); > pgm.setProgram(program, parameterList); > if (pgm.run() != true) { > errorParm = "1"; > } else { > AS400Text errorValue = new AS400Text(1); > errorParm = > (errorValue.toObject(parameterList[0].getOutputData())).toString(); > }//end-if > system.disconnectAllServices(); > } catch (Exception e) { > errorParm = "1"; > }//end-try-catch > }//end-callProgram > public static void main(String[] args){ > ExtolCl test = new ExtolCl(); > test.callProgram(); > }//end-Main > }//end-ExtolCl > > Thanks in advance for any help! > > Kelly > > -- > 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.