Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception in thread "main" java.lang.NoClassDefFoundError: hello

Status
Not open for further replies.

josee411

Programmer
May 12, 2003
18
BE
is it possible to work with java instead of javac??

C:\j2sdk1.4.0_01\bin>java hello
Exception in thread "main" java.lang.NoClassDefFoundError: hello

 
"javac" is a compiler - it compiles your code to byte code.
"java" is the interpreter - it runs your application by converting byte code produced by "javac" into machine code.

Your error is because your CLASSPATH environment variable is not set.

Try "java -cp . your_class"
 
i work on windows 2000, i just installed java j2re1.4.1_01

so i have this problem.
i saved my class hello in examples file.
C:\java\bin\examples>java hello
Error: could not open `C:\Program Files\Java\j2re1.4.1_01\lib\i386\jvm.cfg'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top