alphaserver1
MIS
I am able to compile a class : but when I run it get an exception error in thread main java.langNoClassDeffound error mypack
mypack is the directory where I stored the .java file
first line in the file is : package MyPack;
my autoexec.bat has the following: classpath set
PATH "c:\j2sdk1.4.2_04\bin";
CLASSPATH .;c:\MyPack
i can compile the class from the mypack directory in which it is located, but when I do a java classname get the above error, when I take out the line : package mypack;
from the java file and recompile and run it , it works fine.
example of program:
package MyPack;
class Test {
public void main(String[]args)
{ System.out.println("Anything")
}
}
thanks for any suggestions:
mypack is the directory where I stored the .java file
first line in the file is : package MyPack;
my autoexec.bat has the following: classpath set
PATH "c:\j2sdk1.4.2_04\bin";
CLASSPATH .;c:\MyPack
i can compile the class from the mypack directory in which it is located, but when I do a java classname get the above error, when I take out the line : package mypack;
from the java file and recompile and run it , it works fine.
example of program:
package MyPack;
class Test {
public void main(String[]args)
{ System.out.println("Anything")
}
}
thanks for any suggestions: