Exception in thread "main" java.lang.NoClassDefFoundError: while running .bat file
- by Manu
hi, i have bat file like below with name (myBat.bat)
@echo off
set CLASSPATH=%CLASSPATH%;C:\Documents and Settings\nchakk\Desktop\3611 java\
javac packbat.inter.java
javac packbat.samplepack.java
java packbat.inter
java packbat.samplepack
pause
//interface "inter" inside package packbat
package packbat;
public interface inter
{
int i=10;
}
//my main()class inside package packbat
package packbat;
public class samplepack implements inter
{
public static void main(String s[])
{
System.out.println(i);
}
}
after clicking that .bat file it diplay error like below
Exception in thread "main" java.lang.NoClassDefFoundError: packbat/inter
Caused by: java.lang.ClassNotFoundException: packbat.inter
how to run tat .bat file without error. Pls reply ASAP.Thanks in advance