Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Difficulty getting ant to work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
meekrob
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2002
Posts: 81
Location: Tempe, AZ USA

PostPosted: Sat Nov 16, 2002 9:03 pm    Post subject: Difficulty getting ant to work Reply with quote

I've been trying to get ant to work. Java is installed (sun,ibm and blackdown). I manually set ANT_HOME=/usr/share/ant and run env-update and source /etc/profile after every change. When I type ant I get:

Code:
dungeonmaster / # ant
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main


When I emerge I see these errors even though I don't get an ebuild failed message:

Code:
dungeonmaster bin # emerge ant
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/ant-1.5.1-r1 to /
>>> md5 ;-) jakarta-ant-1.5.1-src.tar.gz
>>> Unpacking source...
>>> Unpacking jakarta-ant-1.5.1-src.tar.gz
>>> Source unpacked.
... Bootstrapping Ant Distribution
... Compiling Ant Classes
BuildPath: No such file or directory
BuildPath: using /opt/ibm-jdk-1.3.1/bin/ex
BuildPath: No such file or directory
BuildPath: using /opt/ibm-jdk-1.3.1/bi
Can't find libjvm.so
... Failed compiling Ant classes !
Bootstrap FAILED

>>> Install ant-1.5.1-r1 into /var/tmp/portage/ant-1.5.1-r1/image/ category dev-java
cp: cannot stat `build/lib/*.jar': No such file or directory
chmod: failed to get attributes of `/var/tmp/portage/ant-1.5.1-r1/image//usr/share/ant/lib//*.jar': No such file or directory
strip:
>>> Completed installing into /var/tmp/portage/ant-1.5.1-r1/image/


libvm.so not found?

Code:
dungeonmaster / # find / -name libjvm.so
/opt/ibm-jre-1.3.1/bin/classic/libjvm.so
/opt/sun-jdk-1.4.0/jre/lib/i386/client/libjvm.so
/opt/sun-jdk-1.4.0/jre/lib/i386/server/libjvm.so
/opt/blackdown-jdk-1.3.1/jre/lib/i386/client/libjvm.so
/opt/blackdown-jdk-1.3.1/jre/lib/i386/server/libjvm.so
/opt/blackdown-jdk-1.3.1/jre/lib/i386/classic/libjvm.so
/opt/ibm-jdk-1.3.1/jre/bin/classic/libjvm.so
/opt/blackdown-jre-1.3.1/lib/i386/client/libjvm.so
/opt/blackdown-jre-1.3.1/lib/i386/server/libjvm.so
/opt/blackdown-jre-1.3.1/lib/i386/classic/libjvm.so
find: /proc/7507/fd: No such file or directory


Java home is set to ibm:

Code:
dungeonmaster / # echo $JAVA_HOME
/opt/ibm-jre-1.3.1


Does anyone have any suggestions? I've read the ant docs and done the google, I'm not sure which way to go from here...

Thanks,

Sherman Boyd
Back to top
View user's profile Send private message
m0pr0be
Guru
Guru


Joined: 29 Aug 2002
Posts: 308

PostPosted: Sun Nov 17, 2002 2:21 pm    Post subject: java-config Reply with quote

After you installed java, did you run java-config to set up a default jdk for your system?

Christoph
Back to top
View user's profile Send private message
meekrob
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2002
Posts: 81
Location: Tempe, AZ USA

PostPosted: Sun Nov 17, 2002 6:49 pm    Post subject: Yep Reply with quote

Yeah, I finally got ant to compile with Sun JDK 1.4. However when I switch back to blackdown or ibm 1.3.1 it is broken again, different error:

Code:
dungeonmaster etc # ant
Buildfile: build.xml does not exist!
Build failed


I need to use a 1.3.1 Java to compile OpenOffice or java support for Postgresql. Argh.
Back to top
View user's profile Send private message
m0pr0be
Guru
Guru


Joined: 29 Aug 2002
Posts: 308

PostPosted: Sun Nov 17, 2002 11:30 pm    Post subject: Reply with quote

Quote:

Code:
dungeonmaster etc # ant
Buildfile: build.xml does not exist!
Build failed


that doesnt look jdk related. you just dont have a build.xml file in your current directory. and ant definitely needs one to run! its just like a Makefile for make.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum