Re: cant's compile with javac



In article <1133127445.931575.32890@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Ido.Yehieli@xxxxxxxxx took the hamburger, threw it on the grill, and I
said "Oh wow"...

> Hi, whenever I try to compile something with javac from the command
> prompt (windows XP) i get the following error:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/sun/tools/javac/Main
>
> even if I just write "javac" without a file to compile i get the same
> error.
> The only time when i works correctly is when I'm in the bin directory
> that contains javac, the i can compile everything. If i change to a
> different directory it doesn't work and i get the afordmentioned error.
> one more thing - when i compile from eclipse it works, i only get it
> when manually compiling for the command prompt.
> I'm using version 1.5 update 5 (the last one) but it happened with
> earlier versions as well (1.5 update 1, update 2, etc..)
>
> Thanks in advance for your help.
>
>

cd go/to/the/directory/where/your/javafile/is
then javac Yourfile.java



--
Noodles Jefferson
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM

"Our earth is degenerate in these latter days, bribery and corruption
are common, children no longer obey their parents and the end of the
world is evidently approaching."
--Assyrian clay tablet 2800 B.C.
.



Relevant Pages

  • Re: cannot run javac command
    ... No problems with using Netbeans--but can't compile the hello world prog ... using command line. ... That's done but when I go to javac helloworldapp.java as system does not ... Microsoft Windows XP Copyright ...
    (comp.lang.java.help)
  • Re: newbie servlet help
    ... > I'm geting this error when I try to compile a servlet (command line ... a separate jar file (servlet.jar) with the servlet container. ... that location as part of the classpath for javac and java. ... Try adding '-source 1.4' to the javac command. ...
    (comp.lang.java.programmer)
  • Re: Dealing with packages UNIX
    ... Everything has the same package name in teh same directory. ... ALso when my web app runs it is using an older version of the class file taht wont compile even afer I did a rm *.class and replaced them with the javac *.java. ... javac needs a defined sourcepath to work. ...
    (comp.lang.java.programmer)
  • Re: Learning JAVA need help
    ... I also tried to run the compile from the command line using the command ... Exception in thread "main" java.lang.NoClassDefFoundError: ... The exception is thrown by the javac command and not by your ...
    (comp.lang.java.help)
  • Re: More info about this strange compile error
    ... > I get compile error when compiling using the command javac from the ... > Then I do javac HelloWorld.java ... > symbol: class Slask ... > location: class HelloWorld ...
    (comp.lang.java)