my java clascompile but not run
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
i wrote a java class.and i try to compile and run it.
but it compile not run.it gives class not found error.i
i set the classpath to the java "bin".
but it compile not run.it gives class not found error.i
i set the classpath to the java "bin".
posted 16 years ago
The classpath is used to find the Java classes -- not to find the java compiler or JVM. So, unless you happen to also placed your compiled classfiles in the bin directory, this is wrong.
Henry
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
i set the classpath to the java "bin".
The classpath is used to find the Java classes -- not to find the java compiler or JVM. So, unless you happen to also placed your compiled classfiles in the bin directory, this is wrong.
Henry
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
shawn peter
Ranch Hand
Posts: 1325
1
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
no i didn't put my class files in bin director.
my class is in Desktop .I compiled it .It compiles with no errors.
but when i am goging to run it says classNoFound error.
I already have set the classpath to the java bin directory and JAVA_HOME to the JDK folder.
what is the reason for this error?
my class is in Desktop .I compiled it .It compiles with no errors.
but when i am goging to run it says classNoFound error.
I already have set the classpath to the java bin directory and JAVA_HOME to the JDK folder.
what is the reason for this error?
posted 16 years ago
The PATH should include the Java bin directory, and not the CLASSPATH. That should be the directory where your class files are located (or at least the current directory, .)
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
aruna sameera wrote:I already have set the classpath to the java bin directory
The PATH should include the Java bin directory, and not the CLASSPATH. That should be the directory where your class files are located (or at least the current directory, .)
shawn peter
Ranch Hand
Posts: 1325
1
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks Rob
Finaly it works.I set the classpath tothe current Directory.
Finaly it works.I set the classpath tothe current Directory.
| New rule: no elephants at the chess tournament. Tiny ads are still okay. Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |









