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




Hi Mike,

I'm not sure we're getting enough or complete information.

The program still runs, but it doesn't appear to be
hitting the email piece.

How so? Are you getting any errors/exceptions? If it's a classpath issue, you should get a class not found or similar. If no exceptions, then there may be some wait or other issue with email itself. You're not just eating exceptions, are you? ( OT: I have a client who is paying perfectly good money to a perfectly bad offshore group who does just that. Now they are paying me to clean up the code and make it work properly. Somehow I miss the savings part of that process...)

All of the java code in folder mercury.

Yep, but more specifically in engineering\mercury\iseriesjava, right? Still, you say:

So after changine MercTest, I added mail.jar and activation.jar to
P:\enginnering\iseriesjava

but your classpath is:

P:\engineering\mercury\iseriesjava\mail.jar;P:\engineering\mercury\iseriesjava\activation.jar

Please clarify. Do you have enginnering\iseriesjava *and* engineering\mercury\iseriesjava directories? I don't really understand your call:

java -cp
P:\\engineering\mercury\iseriesjava;P:\engineering\mercury\iseriesjava\j
t400.jar;P:\engineering\mercury\iseriesjava\mail.jar;P:\engineering\merc
ury\iseriesjava\activation.jar mercury.MercTest

since the default "." goes away when you specify classpath, it seems to say that you also have a engineering\mercury\iseriesjava\mercury directory. I'm sure I'm missing something...

Something I do to cut down on classpath clutter is to change to the appropriate top directory first. That assumes your classes and jars are in a hierarchy. Also, even in Windows, for Java paths you can use forward slashes. Then you can use "." and "./pathFromCurrentDirectoryToJar" statements in the classpath.


Joe Sam

Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400

----- Original Message ----- From: "Smith, Mike" <Mike_Smith@xxxxxxxxxxxxxxxx>
To: "Java Programming on and around the iSeries / AS400" <java400-l@xxxxxxxxxxxx>
Sent: Thursday, October 23, 2008 11:04 AM
Subject: Classpath issues- I think.


I always seem to have trouble with this.

I have a java program that I have been running for quite a while. I
have just made changes to it, to email me in the event of a problem. It
works fine in WDSC, but when I export it and run it, then no email. I
have added the mail.jar and activation to the folder and changed my
classpath, but still no luck.

Initially I had this
P:\engineering\iseriesjava. - this contained jt400.jar and my .bat file
containing the following line
java -cp
P:\\engineering\mercury\iseriesjava;P:\engineering\mercury\iseriesjava\j
t400.jar mercury.MercTest

All of the java code in folder mercury.

So after changine MercTest, I added mail.jar and activation.jar to
P:\enginnering\iseriesjava
And changed the .bat file to look like
java -cp
P:\\engineering\mercury\iseriesjava;P:\engineering\mercury\iseriesjava\j
t400.jar;P:\engineering\mercury\iseriesjava\mail.jar;P:\engineering\merc
ury\iseriesjava\activation.jar mercury.MercTest

The program still runs, but it doesn't appear to be hitting the email
piece.

I'm not sure how to fix this. Is there a way for me to debug the java
program outside of WDSC? I have put System.out.println at the point of
the email, but they don't print unless I run it in WDSC.

Mike
--



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.