Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-20-2009, 09:10 PM   #1
Registered: Nov 2004
Distribution: CentOS-4
Posts: 142

Rep: Reputation: 15
JavaJDK & Apache Ant

I am trying to install some software which was built with Ant, but I am a Java noobe, so its kicking my butt! I have followed a few sets of instructions for installing Java on CentOS 5, but they always seem to be for the wrong thing and now I seem to have all kinds of Java all over the place, except apparently the one I need.

Here is the condition Ant is complaining about:
$ ant
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.6.0-openjdk-
Buildfile: build.xml does not exist!
Build failed
Do I understand correctly that this is my Java machine or interpreter as I suppose? I mean that seems to be installed correctly:
$ java -version
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-Fedora-EPEL-5) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 1.6.0_0-b12, mixed mode)
Other people who have reported the same error (Unable to locate tools.jar), seem to install the JDK to fix the issue - which I guess is a build environment for building Java apps. (correct?)

Following what seemed to be instructions for installing the JDK - I installed the RPM:jdk-6u13-linux-i586.rpm. However, the result was an install down in opt - /opt/sun/javadb

In that tree there is a derbytools.jar, but, its not a tools.jar like Ant is looking for AND Ant seems to definitely want JAVA_HOME to point to its current 1.6.0 directory.

So - any suggestions? Can I make this JDK work with my other Java install? Am I using the wrong or incompatible parts?
Old 04-20-2009, 11:32 PM   #2
Registered: Nov 2004
Distribution: CentOS-4
Posts: 142

Original Poster
Rep: Reputation: 15
Well . . .

I symlinked the LIB dir from the JDK into the JRE and I copied derbytools.jar into tools.jar - should that have worked or am I being optimistic? The unable to locate tools.jar has gone away and I don't see any other errors, but I am not convinced it was an actual fix.
Old 06-09-2009, 06:50 PM   #3
LQ Newbie
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0

I had the same message. What I did is:

1. found where it is located: find / -name tools.jar --- it showed me /usr/lib/jvm/java-1.5.0-gcj-
2. changed my JAVA_HOME: export JAVA_HOME=/usr/lib/jvm/java-1.5.0-gcj-

Message is gone. Typed then: ant -version and it said: Apache Ant version 1.7.1 compiled on June 27 2008

Last edited by rafgaray; 06-09-2009 at 06:54 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install Apache Ant? yuri16 Linux - Newbie 1 01-26-2009 08:03 PM
Tomcat - Apache Ant Installation crazycondor Debian 1 12-20-2006 05:37 AM
Apache Ant - Tomcat Installation crazycondor Linux - Newbie 1 12-16-2006 11:27 PM
creating apache-ant package merchtemeagle Slackware 3 05-11-2005 01:12 PM
Question about Apache Ant Hockeyfan Programming 2 02-19-2005 01:17 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration