|
For another approach, you might want to consider setting the QIBM_CHILD_JOB_SNDINQMSG environment variable. This works for all spawned processes, not just JVMs. This is also helpful when debugging shell scripts executed via STRQSH(command). http://publib.boulder.ibm.com/iseries/v5r1/ic2924/info/rzaha/qibmenv.htm > -----Original Message----- > From: java400-l-bounces@xxxxxxxxxxxx > [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of > pekrzyz@xxxxxxxxxxxxxxx > Sent: Friday, July 04, 2003 9:30 AM > To: java400-l@xxxxxxxxxxxx > Subject: Re: Debugging Java programs on the ISeries > > > I've also been to hell and back trying to debug Java programs > on the AS400 > but I finally got it to work. I was calling a Java program > from RPG, and > I wanted to debug the Java code that was being remotely > called from the > RPG. I was using STRSRVJOB on another session so that I > could remotely > debug the Java code. I needed to be able to debug my Java > class on the > AS400, not on a Windows box running a remote debugger. > > What I found out was the following: > > When you try to debug a Java class using the STRDBG command > on the AS400, > the command doesn't work unless the JVM is already running > and your class > is loaded. > > I found that I was constantly getting the error 'Java class file not > available.' I even tried the full pathname (eg. > /home/myjava.class) but it > didn't work even though I did have my environment CLASSPATH > variable set > properly. I pressed F1 to get a further explanation on the > error and > found out that the reason code returned was 1 for '1 - Java virtual > machine not started.'. > > Once my RPG program was loaded and had started the copy of my > Java class, > I was then able to debug the Java Code, since the JVM was now > running. I > also learned quickly that you have to match exactly, the name > of the class > in the STRDBG command matching upper and lower-case > characters. As well, > you don't enter in the extension of class. So my class name > 'OraCon.class' was entered in as OraCon. > > Another trick I used was to set a breakpoint in my RPG code > to break at > the point where the Java class was instantiated. Once the > program hit > this breakpoint, I then used F14 from within STRDBG and added > the Java > Class right after it was created. I was then able to use Option 5 > 'Display Module Source' and then set a break point in my Java > code and > then step through my Java class. > > > ...Paul > _______________________________________________ > 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 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.