Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

classpath question

  Asked By: Adelisa    Date: Feb 11    Category: Java    Views: 1172

I have a classpath problem and I need some help.
I have a jav.bat file in the same folder with my
java file on my floppy. The jav.bat file is written as
c:\jbuilder5\jdk1.3\bin\java%1 The error i get when I try to run any program is:
Exception in thread "main" java.lang.NoClassDefFoundError:



1 Answer Found

Answer #1    Answered By: Chione Massri     Answered On: Feb 11

The jvm cannot find jhw04.class in the current
classpath.<br><br>Do a file  search for this file, then attempt to run
it by typing<br>java -classpath <path where the
class file lives> jhw04<br><br>You will not be able
to use the jav.bat file because it has only 1
argument (%1).<br><br>Alternately, you could state:<br>set
classpath=%classpath%;<path where the class file lives><br>then run  using
the jav.bat with the argument.

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