getting problem in compiling java program?
C:\PROGRA~1\Java\JDK15~1.0\bin>javac sample.java
C:\PROGRA~1\Java\JDK15~1.0\bin>java sample
Exception in thread "main" java.lang.NoClassDefFoundError: sample
plse anyone help me? i am getting the above problem, plse send me solutions>>>>>>>>>>>>
class sample
{
public static void main()
{
System.out.println("this is a simple program");
}
}
this is my simple program, and not even this all programs same problems.................
no yar same getting problem, and i think in setting class path problem ?
but i do't know how to set the classpath in environment variables>>>>>>>>
To set the class path in environment variables in Both User variables and System variables tabs give these to values(classpath and path).
variable name : CLASSPATH
variable value : C:\Program Files\Java\jdk1.5.0_05\lib;
and
variable name : PATH
variable value : C:\Program Files\Java\jdk1.5.0_05\bin;