• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

class Test {
public static void main(String ars[]) {

System.out.println("this is example program");
}
}



i could not figure out what is the problem in my system,
the problem is i am not able to run this program in DOS ,i could do in Eclipse.


Even i have set the path in environment as
path
C:\bea\jdk150_11\bin
JAVA_HOME
C:\bea\jdk150_11

Still i am getting Exception in thread "main" java.lang.NoClassDefFoundError: Test


could you please help me some one


With Regards,
Kalai.

 
kalaiyarasan sivaprakasam
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,


I got where i did the mistake,

in environment variable

CLASS_PATH

i did not give . symbol so now i have added its working fine..

With Regards,
Kalai.
 
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use Code Tags for posting codes and keep away from IDE's when you are starting off!
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kalaiyarasan sivaprakasam wrote:...in environment variable

CLASS_PATH

i did not give . symbol so now i have added its working fine...


Unless you need a system classpath for somehing else, it's best to not have a classpath set at all. Otherwise, yes, it should include a dot for the current directory.
 
reply
    Bookmark Topic Watch Topic
  • New Topic