Ron Anderson wrote:

1.  I have created a .JAR file of my application named
2.  I have placed myapplication.jar in a directory that also contains
all of the helper JAR files (jt400.jar, etc).

Ok so far.

3.  I call the application on the command line using:  java -jar

I think if you are using the -jar parameter, you need to include everything in the jar file that your application needs.

5.  The application immediately does a JDBC initialization with a
Class.forName("");   This is the
JDBC driver to connect to the AS400.
6.  I am receiving a ClassNotFoundException error on
"".   This class is in the
jt400.jar.   I have verified this by looking at the table of contents
of jt400.jar.

This is because your JAR file does not contain the JT400 classes.

7. I have manually created a manifest file below:

Can I suggest you get your application running without doing fancy things with JAR manifests.

Your command line should look something like this:

java -classpath "application.jar;jt400.jar;<whatever else>" com.yourco.package.MainClass

After you get it running the way you want, then you can start exploring alternative packaging.


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page