Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

running problem

  Asked By: Kerri    Date: Jun 06    Category: Java    Views: 599
  

i'm using jdk 1.3 with windows 2000 professional. i have set the path and the
classpath in environment variables.
i can use javac very conviniently
but every time i java a program, for example
java xyz
i get the message
Exception in thread "main" java.lang.NoClassDefFoundError: xyz
my details for path and classpath are
classpath=C:\jdk1.3\lib;C:\j2sdkee1.2.1\lib\j2ee.jar
path=C:\jdk1.3\bin;C:\j2sdkee1.2.1\bin
i have used many programs earliear and they worked fine
but this a new problem. i tried using both old and new class files.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Terence Mitchell     Answered On: Jun 06

You will give path in "Autoexec.bat" file open in edit mode give path and save
it.
And close it once you run simple give autoexec press enter and run your java
program
it will be work.

 
Answer #2    Answered By: Adalwin Fischer     Answered On: Jun 06

You should also set class path to the directory
where the class file you execute is placed.

 
Answer #3    Answered By: Skye Hughes     Answered On: Jun 06

you complained that you are receiving error massage
java.lang.NoClassDefFoundError:... Ok you don't have
any problem  with your JAVA version or with any path or
classpath. leave it as it is. why you are receiving
this massage b'z JAVA is case sensitive may be you
have typed java xyz weather it might be java XYZ. so
type java XYZ only. and if possible please do one
thing when you create any new class, capitalize its
first digit Uppercase always. like Xyz or MyClass or
MyFirstApplet...

this will sure help you... if it dose leave massage
for me on java_official.

 
Didn't find what you were looking for? Find more on running problem Or get search suggestion and latest updates.




Tagged: