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's

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
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:605)
--
This is the Java Programming on and around the IBM i (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 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-2022 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.