Re: ant: Modern compiler is not available
Bill Wohler <wohler@newt.com> wrote:
> Hey gang. I just started using ant and can't compile anything.
> Unfortunately, Stefan can't reproduce the following. Perhaps one of
> you has seen this and found the fix...
>
> I have the j2sdk1.3 package installed which populates both
> /usr/lib/j2re1.3 and /usr/lib/j2sdk1.3; I've set JAVA_HOME to both.
> I've also made the link to tools.jar in /usr/share/ant/lib per ant's
> README.debian, all to no avail. Any other suggestions greatly
> appreciated.
I don't know why but it seems that the ant script does not set the
java_home variable. You can add these lines in the /usr/bin/ant file:
# you already have this line
#!/bin/sh
# add these 4 lines
if [ -z "$JAVA_HOME" ]; then
JAVA_HOME="/usr/lib/j2sdk1.3"
fi
export JAVA_HOME
# OK leave the rest of the file
# Load default settings from config file (if it exists)
if [ -f "$HOME/.antrc" ]; then
. "$HOME/.antrc"
fi
Hope it helps. Sorry for the delay.
--_
/_\ _|
/ \rnau(_| http://vbstefi60.fapse.ulg.ac.be/
Reply to: