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



Ron Anderson wrote:

1.  I have created a .JAR file of my application named
(myapplication.jar).
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
myapplication.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("com.ibm.as400.access.AS400JDBCDriver");   This is the
JDBC driver to connect to the AS400.
6.  I am receiving a ClassNotFoundException error on
"com.ibm.as400.access.AS400JDBCDriver".   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.

david



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.