| Author |
Exception in thread "main" java.lang.NoClassDefFoundError: Test
|
kalaiyarasan sivaprakasam
Greenhorn
Joined: Aug 17, 2009
Posts: 29
|
|
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
Joined: Aug 17, 2009
Posts: 29
|
|
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.
|
 |
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
|
Please use Code Tags for posting codes and keep away from IDE's when you are starting off!
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
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.
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
 |
|
|
subject: Exception in thread "main" java.lang.NoClassDefFoundError: Test
|
|
|