just emerged dev-java/ant-core, but when i try to use ant for some Java applications (for example: freemind) i get: # Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher ant debugging report: # ant --execdebug # exec "/opt/sun-jdk-1.5.0.06/bin/java" -classpath "/usr/share/ant-core/lib/ant-launcher.jar::/opt/sun-jdk-1.5.0.06/lib/tools.jar" -Dant.home="/usr/share/ant-core" -Dant.library.dir="/usr/share/ant-core/lib" org.apache.tools.ant.launch.Launcher -cp "." # Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher the problem is: there is nothing under /usr/share/ant-core/lib/*, so ant-launcher.jar and ant.jar are not found. indeed, the emerge process show no files installation under that dir: >>> Completed installing ant-core-1.6.5-r2 into /var/tmp/portage/ant-core-1.6.5-r2/image/ man: >>> Merging dev-java/ant-core-1.6.5-r2 to / --- /etc/ --- /etc/env.d/ >>> /etc/env.d/20ant --- /usr/ --- /usr/share/ --- /usr/share/doc/ >>> /usr/share/doc/ant-core-1.6.5-r2/ >>> /usr/share/doc/ant-core-1.6.5-r2/KEYS.gz >>> /usr/share/doc/ant-core-1.6.5-r2/WHATSNEW.gz >>> /usr/share/doc/ant-core-1.6.5-r2/README.gz --- /usr/share/ant-core/ >>> /usr/share/ant-core/package.env --- /usr/share/ant-core/lib/ --- /usr/share/ant-core/bin/ >>> /usr/share/ant-core/bin/complete-ant-cmd.pl -> /usr/bin/complete-ant-cmd.pl >>> /usr/share/ant-core/bin/runant.py -> /usr/bin/runant.py >>> /usr/share/ant-core/bin/runant.pl -> /usr/bin/runant.pl >>> /usr/share/ant-core/bin/antRun -> /usr/bin/antRun --- /usr/bin/ >>> /usr/bin/complete-ant-cmd.pl >>> /usr/bin/runant.py >>> /usr/bin/runant.pl >>> /usr/bin/antRun >>> /usr/bin/ant debugging the Ant Env i have found also: #vi /usr/share/ant-core/package.env DESCRIPTION=Java-based build tool similar to 'make' that uses XML configuration files. GENERATION=1 CLASSPATH=/usr/share/ant-core/lib/ant.jar:/usr/share/ant-core/lib/ant-launcher.jar CLASSPATH is sets correcly, but either ant.jar and ant-launcher.jar are not present in /usr/share/ant-core/lib/, but they are present in: # ls -la /var/tmp/portage/ant-core-1.6.5-r2/work/apache-ant-1.6.5/build/lib/ totale 1532 drwxr-xr-x 2 root root 620 30 giu 17:35 . drwxr-xr-x 3 root root 180 30 giu 17:35 .. -rw-r--r-- 1 root root 471 30 giu 17:35 ant-antlr.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-apache-bcel.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-apache-bsf.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-apache-log4j.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-apache-oro.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-apache-regexp.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-apache-resolver.jar -rw-r--r-- 1 root root 14571 30 giu 17:35 ant-bootstrap.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-commons-logging.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-commons-net.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-icontract.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-jai.jar -rw-r--r-- 1 root root 906260 30 giu 17:35 ant.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-javamail.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-jdepend.jar -rw-r--r-- 1 root root 6610 30 giu 17:35 ant-jmf.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-jsch.jar -rw-r--r-- 1 root root 11612 30 giu 17:35 ant-junit.jar -rw-r--r-- 1 root root 8484 30 giu 17:35 ant-launcher.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-netrexx.jar -rw-r--r-- 1 root root 418278 30 giu 17:35 ant-nodeps.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-starteam.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-stylebook.jar -rw-r--r-- 1 root root 6777 30 giu 17:35 ant-swing.jar -rw-r--r-- 1 root root 66794 30 giu 17:35 ant-trax.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-vaj.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-weblogic.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-xalan1.jar -rw-r--r-- 1 root root 471 30 giu 17:35 ant-xslp.jar this mena that the compilation process is right, all the *.jar files are compiled and located in the right dir, but the ebuild process do not install them. both 'arch' anche '~arch' are affected: dev-java/ant-core-1.6.2-r5 dev-java/ant-core-1.6.5-r2 here my gentoo infos: Portage 2.1.1_pre1-r2 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo i686) ================================================================= System uname: 2.6.17-gentoo i686 VIA Samuel 2 Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=c3 -mtune=c3 -O2 -pipe -fno-ident -fomit-frame-pointer -momit-leaf-frame-pointer -fforce-addr -fweb -ftracer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=c3 -mtune=c3 -O2 -pipe -fno-ident -fomit-frame-pointer -momit-leaf-frame-pointer -fforce-addr -fweb -ftracer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig confcache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="it_IT.UTF-8" LC_ALL="it_IT.UTF-8" LDFLAGS="-Wl,--as-needed" LINGUAS="it" MAKEOPTS="-j2 -s" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://172.16.1.2/gentoo-portage" USE="3dnow X a52 aac acpi aim alsa apache2 asf async avi bash-completion berkdb bitmap-fonts bzip2 bzlib cairo cdr chroot cli crypt css cups dbus divx4linux dlloader dri dvd dvdr eds emboss encode exif fftw flac foomaticdb ftp gd gif gimp gpg gpm gtk2 hal icq imap imlib isdnlog java jpeg kde ldap libg++ libwww mad memlimit mikmod mime ming mmap mmx mng motif mozsvg mozxmlterm mp3 mpeg msn musepack ncurses nls nptl nptlonly nsplugin nvidia objc ogg oggvorbis openal openexr opengl pam pam_chroot pcntl pcre pdflib perl png posix pppd pwdb python qmail qt quicktime readline reflection samba sasl scanner sdl session sftplogging simplexml socket spamassassin spell spl ssl svg symlink tiff truetype truetype-fonts type1-fonts unicode usb utf8 vhosts vorbis win32codecs wmf x86 xcomposite xine xml2 xmlrpc xorg xprint xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_it userland_GNU video_cards_none video_cards_sis" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Could you try with the most recent revision? It should be like 1.6.5-r13
yes, is not a problem. when i have done the bugreport my portage was not sync to the last release, and so do not tested the 1.6.5-r13 ebuild. now seem that 1.6.5-r13 release do the right job: Merging dev-java/ant-core-1.6.5-r13 to / >>> /usr/share/ant-core/package.env --- /usr/share/ant-core/lib/ >>> /usr/share/ant-core/lib/ant-launcher.jar >>> /usr/share/ant-core/lib/ant.jar [CUT] >>> /usr/bin/ant thanks now works. i suppose the success is done by the new: dev-java/java-config-wrapper dev-java/java-config dev-java/javatoolkit right? (good job boy!)
Yeah, I'm not sure what the difference is between the revisions that would cause the problem. Unless it crops up again, I'm going to attribute it to a freak accident :) Marking fixed.
(In reply to comment #3) > Yeah, I'm not sure what the difference is between the revisions that would > cause the problem. Unless it crops up again, I'm going to attribute it to a > freak accident :) > > Marking fixed. > for me it is ok, but i'm noticing that also all others 4 machines that i have in office have the same problem (i'm tring to install Freemind, and i have only sun-jdk as 'java stuff'); hope will be only a freak accident on mine machines ;) (are all x86 on stable branch)