|
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: Monday, July 18, 2011 11:35 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: NoClassDefFoundError: testjava.class
qsh cmd('pwd')
/home/pdow
qsh cmd('echo $CLASSPATH')
.:/java/dom4j/dom4j-1.6.1.jar:/java/poi3.7/poi-3.7-
20101029.jar:/java/poi3.7/
poi-scratchpad-3.7-20101029.jar:/java/poi3.7/poi-ooxml-3.7-
20101029.jar:/java
/poi3.7/poi-ooxml-schemas-3.7-
20101029.jar:/java/xmlbeans/jsr173_1.0_api.jar:
/java/xmlbeans/xbean.jar
On 7/19/2011 2:06 AM, Gary L Peskin wrote:
Is /home/pdow your home directory? What happens if you type:
qsh cmd('pwd')
and
qsh cmd('echo $CLASSPATH')
?
Gary
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: Monday, July 18, 2011 10:39 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: NoClassDefFoundError: testjava.class
Same as before:
Exception in thread "main" java.lang.NoClassDefFoundError: testjava
Caused by: java.lang.ClassNotFoundException: testjava
at java.net.URLClassLoader.findClass(URLClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:639)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:605)
On 7/18/2011 11:19 PM, Gary L Peskin wrote:
Try to take the ".class" off of your java command so it'ssun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
qsh cmd('java -classpath $CLASSPATH testjava')
HTH,
Gary
-----Original Message-----
From:java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: Monday, July 18, 2011 8:02 PM
To: Java Programming on and around the iSeries / AS400
Subject: NoClassDefFoundError: testjava.class
I have a java program testjava.java, which successfully compiles
into testjava.class.
Both of these are in my current directory, /home/pdow.
When I try to run the program with
qsh cmd('javap -s -public -classpath $CLASSPATH testjava.class')
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
testjava.class Caused by: java.lang.ClassNotFoundException:
testjava.class
at java.net.URLClassLoader.findClass(URLClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:639)
at
at java.lang.ClassLoader.loadClass(ClassLoader.java:605)
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.