Re: Not able to run program




<tgranath@xxxxxxxxx> wrote in message
news:1146416709.486389.218390@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

My computer run Windows XP, and I've set a Classpath that looks like
this:

C:\DJGPP/bin;C:\Program Files\Java\jdk1.5.0_06/bin

Is this correct?

I don't like the look of those mixed slashes and backslashes. You should at
least be consistent in which you use. Fix that and try executing the class
again before you do anything else.

I can compile but not run the programs that I've
written. I get the errormessage
"Exception in thread main java lang NoClassDefFoundError:" Can someone
help me please.

That's a very common error message and can be caused by any number of
conditions. Roedy Green's site, http://mindprod.com, has an article listing
many of the possible causes. Just search on NoClassDefFoundError when you
get there.

If fixing the slashes and looking up the error on Roedy's site don't help
you solve your problem, try posting again but this time be sure to tell us
more about the placement of your source code and where the class file is
supposed to be generated as well as any package names you are using. It's
very possible that you are using a package name and then trying to execute
from the wrong directory.

--
Rhino


.



Relevant Pages

  • Re: my first bean (tomcat)
    ... I believe I have a problem because the package name of my Bean ... I have found this by including into my webapp a Bean I ... Put the bean's class file in the webapp's WEB-INF/classes directory, or jar it up and put the jar in the webapp's WEB-INF/lib directory. ...
    (comp.lang.java.programmer)
  • Re: classpath for web-application.
    ... this is a package in "kowari-1.2.0.jar". ... I have a special class file, ... How should I organize them for a war file in server? ... web-inf or WEB-INF? ...
    (comp.lang.java.help)
  • Re: Newbie question-- where to put java class file in Tomcat server
    ... the location of .class file varies. ... First thing is that the class should belong to a package. ... be packaged into a JAR file ...
    (comp.lang.java.programmer)
  • Re: Package and compiling
    ... When I compile a java source file with a package statement I ... > class file there. ...
    (comp.lang.java)