LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-20-2009, 09:10 PM   #1
riluve
Member
 
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:
Code:
$ ant
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/tools.jar
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:
Code:
$ 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
riluve
Member
 
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
rafgaray
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Smile

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-1.5.0.0/tools.jar
2. changed my JAVA_HOME: export JAVA_HOME=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0

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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:54 PM.

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