• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Windows ME and Classpath

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created the following file in my C:\javacode\ directory. It compiles fine, but when I execute it, i get the error message..

The error message I get:


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


Is this because of my classpath or is it somthing else?
My classpath is :


SET CLASSPATH=C:\j2sdk1.4.0_01\bin;c:\javacode\


If so, How can I get the classpath corrected for Windows ME?
Thanks..
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Always the classpath should be set to the library where all the class files are stored i.e., the JavaHome/lib, where JavaHome is the dir where java is loaded.
So set ur classpath. For beginners u need not set the classpath, all the class files will b loaded in the pwd(present working directory) and it is sufficient that u set the Path to the bin direcory.
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I needed to drop the final \ from the classpath Set statement (C:\javacode )..
Ah well... one day, I'll get the hang of this stuff...
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic