Which javac is being used?
Jiawei Ye
leafy7382 at gmail.com
Thu Jan 27 16:33:07 PST 2005
On Thu, 27 Jan 2005 21:02:06 +0100, Herve Quiroz
<herve.quiroz at esil.univ-mrs.fr> wrote:
> But what intrigues me is the fact that both 'java' and 'javac' should
> use the same logic to pick a JDK (afterall they are both symlinks of
> the same 'javavm' file). Hence whichever JDK is chosen, 'javac -version'
> and 'java -version' would output the same version number...
>
> I'll try to see if I can reproduce the same error as you Jiawey, once
> the java/jdk15 build is done on my box (if I don't lack free HD space
> until then).
>
> But in the mean time, here are my quick two cents:
>
> Is it possible that you use an alias javac->jikes with some
> JIKES_BOOTCLASSPATH (or equivalent) set to /usr/local/jdk1.4.2/...
>
> Jiawei, could you try running the same commands but undefining JAVA_*
> beforehand (and just with JAVA_VERSION=1.5 as suggested by Jonathan)?
>
> Herve
I found the problem. If I set JAVA_HOME=${localbase}/jdk1.5.0/jre,
'java' would run jdk1.5.0 vm but 'javac' picks up the wrong version
from bsd.port.mk since the executable isn't found in ${JAVA_HOME/bin.
Setting JAVA_VERSION=1.5 works.
Regards,
Jiawei Ye
--
"Without the userland, the kernel is useless."
--inspired by The Tao of Programming
More information about the freebsd-java
mailing list