Karthik Vishwanath wrote:
>
> Hi all,
> i use magician with Java as on openGl implementation. I
> have the jdk1.1.7 running on Linux RH5.1. Magician requires that i have a
> CLASSPATH set. The current value of my CLASSPATH is:
> /data/karthik/magician/classes. If I compile a program which uses some
> magician classes, the program compiles fine. But, on trying to execute it
> with java solarSystem; i get the following error: "Can't find class
> solarSystem". The file solarSystem.class *does* exist in my 'pwd'. can
> anyone shed some light on what i must do?
First of all, what is solarSystem ? Is part of a package, or is a
standalone class ?
* If is a part of a package, for example, foo, you must execute it with
"java foo.solarSystem". If java complaints again, then the packate isn't
at the classpath, and you must append _the_parent_ of the directory wich
contains the package to the classpath. For example:
If you have something like <aPath>/bar/foo/solarSistem.class, and the
package is foo, then you have to do something like (bash speaking, this
case) "export CLASSPATH=$CLASSPATH:<aPath>/bar", and then try "java
foo.solarSystem".
* If it is a standalone class, not in a package, then I think that
somethig like (again bash) "export CLASSPATH=$CLASSPATH:$PWD" should do
the trick. Then, you only have to do "java solarSystem", et voiela.
> Microsoft isn't the answer.
> Microsoft is the question and the answer is NO.
I absolutely agree
--
Pocas cosas deseariamos ardientemente
si conocieramos del todo lo que deseamos
François de la Rochefocauld