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



This is indeed frustrating to learn, Steven, but you'll get there.
You're very close already.

There is a subtle difference between the compiler and the runtime; the
compiler assumes that the class you're trying to compile lives in the
current directory (or one of its subdirectories).

The runtime, though, needs explicit instructions.  The easiest way to
run hello world should be to type "set CLASSPATH=." prior to attempting
to run HelloWorld.

Joe


> -----Original Message-----
> From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
> bounces@xxxxxxxxxxxx] On Behalf Of Steven Molinaro
> Sent: Tuesday, September 23, 2003 12:42 PM
> To: java400-l@xxxxxxxxxxxx
> Subject: Frustration!!
> 
> As a newbie to Java on the 400, I am perplexed by the classpath issue.
I
> simply want to run the HelloWorld program from a command line. I have
> the source in /Java. From within QSH, I did a "cd /Java, and then a
> javac HelloWorld.java".
> The compile was successful and the class file now exists in /Java.
When
> I do a java HelloWorld, from within QSH OR from a OS/400 command line,
I
> get all sorts of errors. The first being
> "java.lang.NoClassDefFoundError".
> What I don't understand is if I am able to compile the program,
doesn't
> that mean that the classpath is set correctly and I should be able to
> run it without any problems?  Any suggestions would be greatly
> appreciated. By the way, if it helps, my CLASSPATH ENVVAR is set to
> "'/QIBM/ProdData/HTTP/Public/jt400/lib/'"
> 
> _______________________________________________
> 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 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.