When I emerge dev-java/ant gives me the next error: -------------------------------------------------------------- >>> md5 src_uri ;-) apache-ant-1.5.3-1-src.tar.bz2 >>> Unpacking source... >>> Unpacking apache-ant-1.5.3-1-src.tar.bz2 to /var/tmp/portage/ant-1.5.3-r4/work >>> Source unpacked. Warning: JAVA_HOME environment variable not set. If build fails because sun.* classes could not be found you will need to set the JAVA_HOME environment variable to the installation directory of java. Error: JAVA_HOME is not defined correctly. We cannot execute java Bootstrap FAILED -------------------------------------------------------------- but Emerge install's ant: ---------------------------------------------------- >>> Install ant-1.5.3-r4 into /var/tmp/portage/ant-1.5.3-r4/image/ category dev-java >>> dobin: making /var/tmp/portage/ant-1.5.3-r4/work/apache-ant-1.5.3-1/src/script/antRun executable... >>> dobin: making /var/tmp/portage/ant-1.5.3-r4/work/apache-ant-1.5.3-1/src/script/runant.pl executable... >>> dobin: making /var/tmp/portage/ant-1.5.3-r4/work/apache-ant-1.5.3-1/src/script/runant.py executable... >>> dobin: making /var/tmp/portage/ant-1.5.3-r4/work/apache-ant-1.5.3-1/src/script/complete-ant-cmd.pl executable... install: cannot stat `build/lib/*.jar': No such file or directory man: prepallstrip: strip: strip: >>> Completed installing into /var/tmp/portage/ant-1.5.3-r4/image/ >>> Merging dev-java/ant-1.5.3-r4 to / --- /usr/ --- /usr/bin/ >>> /usr/bin/ant >>> /usr/bin/antRun >>> /usr/bin/runant.pl >>> /usr/bin/runant.py >>> /usr/bin/complete-ant-cmd.pl --- /usr/share/ --- /usr/share/ant/ --- /usr/share/ant/lib/ >>> /usr/share/ant/package.env --- /usr/share/doc/ --- /usr/share/doc/ant-1.5.3-r4/ >>> /usr/share/doc/ant-1.5.3-r4/LICENSE.gz >>> /usr/share/doc/ant-1.5.3-r4/README.gz >>> /usr/share/doc/ant-1.5.3-r4/LICENSE.dom.gz >>> /usr/share/doc/ant-1.5.3-r4/LICENSE.sax.gz >>> /usr/share/doc/ant-1.5.3-r4/WHATSNEW.gz >>> /usr/share/doc/ant-1.5.3-r4/LICENSE.xerces.gz >>> /usr/share/doc/ant-1.5.3-r4/KEYS.gz >>> Safely unmerging already-installed instance... --- !mtime obj /usr/share/doc/ant-1.5.3-r4/WHATSNEW.gz --- !mtime obj /usr/share/doc/ant-1.5.3-r4/README.gz --- !mtime obj /usr/share/doc/ant-1.5.3-r4/LICENSE.xerces.gz --- !mtime obj /usr/share/doc/ant-1.5.3-r4/LICENSE.sax.gz --- !mtime obj /usr/share/doc/ant-1.5.3-r4/LICENSE.gz --- !mtime obj /usr/share/doc/ant-1.5.3-r4/LICENSE.dom.gz --- !mtime obj /usr/share/doc/ant-1.5.3-r4/KEYS.gz --- !mtime obj /usr/share/ant/package.env --- !mtime obj /usr/bin/runant.py --- !mtime obj /usr/bin/runant.pl --- !mtime obj /usr/bin/complete-ant-cmd.pl --- !mtime obj /usr/bin/antRun --- !mtime obj /usr/bin/ant <<< dir /usr/share/ant/lib --- !empty dir /usr/share/doc/ant-1.5.3-r4 --- !empty dir /usr/share/doc --- !empty dir /usr/share/ant --- !empty dir /usr/share --- !empty dir /usr/bin --- !empty dir /usr >>> original instance of package unmerged safely. >>> Regenerating /etc/ld.so.cache... >>> dev-java/ant-1.5.3-r4 merged. dev-java/ant selected: none protected: 1.5.3-r4 omitted: none >>> clean: No packages selected for removal. >>> Regenerating /etc/ld.so.cache... >>> Auto-cleaning packages ... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. -------------------------------------------------------- There is one way to make emerge to build ant correctly. # export JDK_HOME=$JAVA_HOME # emerge ant
I tried it normally, and it compiled. Have you set Your VM with java-config ?? Please reopen if applicable.