g_goyal2000
Youngling
I have J2SE Development Kit 5.0 as well as J2SE Runtime Environment 5.0 Update 3 installed on my machine running Windows XP SP2. I use MS-DOS for compiling & running Java programs.
I have installed J2SE Development Kit 5.0 in directory D:\jdk1.5.0
& J2SE Runtime Environment 5.0 Update 3 in default installation directory D:\Program Files\Java\jre1.5.0_03
When I compile any Java program using X:\javac <filename.java> command, the file complies properly & all the classes are formed.
But when I run the program using X:\java <classname> command, it gives me an error
"Exception in thread "main" java.lang.NoClassDefFoundError: Gaurav"
Even a simple "Hello World" program isn't running.
Here's the coding for "Hello World".
class Gaurav{
public static void main (String args[]){
System.out.println("Hello World");
}
}
I have set the paths properly.
Here is the path.
SET PATH=D:\jdk1.5.0\BIN;D:\jdk1.5.0\DEMO;D:\jdk1.5.0\INCLUDE;D:\jdk1.5.0\LIB;D:\jdk1.5.0\JRE;D:\Windows\System32\wbem\;D:\Windows\System32\;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
My institute has JDK 1.3 installed on the machines & the all the Java programs (even Hello World) work fine. I try all the programs at home that I try (and also work fine) at my institute but none work at home PC.
What's the problem?
Kindly help.
I have installed J2SE Development Kit 5.0 in directory D:\jdk1.5.0
& J2SE Runtime Environment 5.0 Update 3 in default installation directory D:\Program Files\Java\jre1.5.0_03
When I compile any Java program using X:\javac <filename.java> command, the file complies properly & all the classes are formed.
But when I run the program using X:\java <classname> command, it gives me an error
"Exception in thread "main" java.lang.NoClassDefFoundError: Gaurav"
Even a simple "Hello World" program isn't running.
Here's the coding for "Hello World".
class Gaurav{
public static void main (String args[]){
System.out.println("Hello World");
}
}
I have set the paths properly.
Here is the path.
SET PATH=D:\jdk1.5.0\BIN;D:\jdk1.5.0\DEMO;D:\jdk1.5.0\INCLUDE;D:\jdk1.5.0\LIB;D:\jdk1.5.0\JRE;D:\Windows\System32\wbem\;D:\Windows\System32\;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
My institute has JDK 1.3 installed on the machines & the all the Java programs (even Hello World) work fine. I try all the programs at home that I try (and also work fine) at my institute but none work at home PC.
What's the problem?
Kindly help.