tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Zammetti" <fzamm...@hotmail.com>
Subject RE: A little offbeat question
Date Thu, 16 Sep 2004 12:30:17 GMT
Yeah, as others have said, JAVA can't find your classs.  Either add the 
directory the class file is in to your classpath, or just execute:

java -cp . HelloWorld

That will add the current directory to the classpath for the current 
execution.

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
www.omnytex.com





>From: "John Najarian" <j-najarian@earthlink.net>
>Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>To: <tomcat-user@jakarta.apache.org>
>Subject: A little offbeat question
>Date: Thu, 16 Sep 2004 00:00:52 -0700
>
>I tried to run a program I thought would but it doesn't.
>
>This is on a windows XP platform.
>
>Everything compiled well but I get this error:
>
>Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class
>
>
>
>So I went back and tried a no brainer 'HelloWorld'  This is the code.
>
>/**
>
>  * The HelloWorld class implements an application that
>
>  * displays "Hello World!" to the standard output.
>
>  */
>
>public class HelloWorld {
>
>     public static void main(String[] args) {
>
>         // Display "Hello World!"
>
>         System.out.println("Hello World!");
>
>     }
>
>}
>
>
>
>It compiles but I get the same error.
>
>I check my environment variables and mine are
>
>JAVA_HOME c:\j2sdk1.4.2_03
>
>PATH
>C:\Perl\bin\;C:\j2sdk1.4.2_03\bin\;C:\j2sdkee1.3.1\bin\;%SystemRoot%\system3
>2;%SystemRoot%;%SystemRoot%\system32\WBEM
>
>
>
>Any ideas?
>
>
>
>Thanks in advance
>

_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back to 
School Guide! http://special.msn.com/network/04backtoschool.armx


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message