|
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.java: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
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.