Re: cant's compile with javac




<Ido.Yehieli@xxxxxxxxx> wrote in message
news:1133141057.346011.321100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> OK, bit the question is not why it is compilng with eclipse, but rather
> isn't it compiling when using javac outside of JAVA_HOME\bin?
> I mean, if it was a PATH problem, then why is "java" working?
> and if it was a problem with "javac" then why is it working in
> JAVA_HOME\bin directory but not in any other directory?
>
I think you may be confusing PATH with CLASSPATH. PATH identifies where your
key Java executables - particularly java and javac - are situated. CLASSPATH
identifies where your .class files (executable versions of your source code)
are situated. PATH and CLASSPATH are frequently quite different. It sounds
like you have PATH set fine but I think you need to look into CLASSPATH:
find out what it does and how to set it to what you want.

Eclipse handles your CLASSPATH for you by letting you add additional class
files and/or jars so that they can be 'seen' by the Eclipse execution
modules. When you use the command line, you have to set the CLASSPATH
yourself.

Rhino



.



Relevant Pages

  • Re: cants compile with javac
    ... > OK, bit the question is not why it is compilng with eclipse, but rather ... > isn't it compiling when using javac outside of JAVA_HOME\bin? ... > I mean, if it was a PATH problem, then why is "java" working? ...
    (comp.lang.java.help)
  • Re: cants compile with javac
    ... OK, bit the question is not why it is compilng with eclipse, but rather ... isn't it compiling when using javac outside of JAVA_HOME\bin? ... I mean, if it was a PATH problem, then why is "java" working? ...
    (comp.lang.java.help)
  • [Eclipse 3.3 + Ant 1.7] Classpath length on Windows XP
    ... I'm using Ant from within Eclipse to build a project on developer ... and accordingly define two targets "compile" ... classpath argument of the task. ...
    (comp.lang.java.softwaretools)
  • Re: Improving String.equals() implementation
    ... Eclipse, and it never let me off the hook for using javac. ... and the compiler's reliance on interning Strings ... I refer to any brand of compiler as "javac". ...
    (comp.lang.java.programmer)
  • javac and java -classpath with regards to ant
    ... javac. ... "The class path tells the JDK tools and applications ... Tidy.jar would be in the classpath. ... And that's what I want ant to do, ...
    (comp.lang.java.help)