Umm..this message was originally sent May 18, 2006. Apparently it got
lost in the mail. I no longer need this question answered.

Kelly 

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kelly Cookson
Sent: Thursday, May 18, 2006 12:31 PM
To: java400-l@xxxxxxxxxxxx
Subject: Help with Toolbox for Java on the iSeries

I looked through the archives but couldn't find what I needed, so...

I'm trying to move some Java classes that use Toolbox for Java to the
iSeries.

I put a Java class file called ExtolCl in /QIBM/ProdData/Java400/ where
the delivered Hello.class file is located and where the jt400ntv.jar
file is located.

I enter java Hello and the delivered Hello program runs fine. I enter
java ExtolCl and I get this error:

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:17)

        at ExtolCl.main(ExtolCl.java:37)

Java program completed with exit code 1


What do I need to change in order to get the Toolbox for Java classes to
be picked up? Here's the entire program code:

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,
Kelly

A cop stopped me for speeding. He said, "Why were you going so fast?" I
said, "See this thing my foot is on? It's called an accelerator. When
you push down on it, it sends more gas to the engine. The whole car just
takes right off. And see this thing? This steers it." -- Steven Wright

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


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

This mailing list archive is Copyright 1997-2022 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.