RE: no class error

Aren't classpaths just a pain!!!

I don't know how your directory structure is set up, but I have a VisAD
directory that has visad.jar in it along with the visad_examples.jar. I
unpacked the examples jar file and it created a visad\examples directory
under the VisAD  with the example source in there.  After I compiled the
java source to class files I have the .class files in the same directory.
In that directory, at the DOS prompt, I execute:

java -cp .;..\..\visad.jar River

And it runs.  You can also specify class path the in the environment
variable, CLASSPATH,  if you do not want to specify it in the command line.

It may be hard to read, so after the -cp  there is a period to specify the
current directory, then there is a semicolon, followed by two periods, a
backslash, two periods, another backslash and then the visad.jar file.

Hope this helps.


-----Original Message-----
From: owner-visad-list@xxxxxxxxxxxxx
[mailto:owner-visad-list@xxxxxxxxxxxxx]On Behalf Of Brobbey,Isaac
Sent: Thursday, August 01, 2002 7:51 PM
To: 'Don Murray '
Subject: no class error

 Can any body help me with an error i am trying to fix.
i have sucessfully compiled visad with the help from curtis, but the thing
is that if i try to run any programm after sucessfully compiling the
program, i get an error that saids:

C:\brobbs>java Rivers
Exception in thread "main" java.lang.NoClassDefFoundError: Rivers

i get this error for all the programs that i have compiled and tried to run.
it may sound dumb, but i need help on this.



  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: