LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-01-2008, 01:23 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
How do I set up Ant


I need help in setting up Ant

I installed apache-ant-1.7.1 to my home directory.

I'm following the directions for installing ant at:
http://ant.apache.org/manual/install.html

I added the path:
PATH=$PATH:/sbin/:/home/joe/program_downloads/ant_program/apache-ant-1.7.1/bin/
export PATH

I set the ANT_HOME environment variable:
export ANT_HOME=$/home/joe/program_downloads/ant_program/apache-ant-1.7.1/

When I ran bash-3.1$ ant I got this:
Unable to locate tools.jar. Expected to find it in /usr/lib/jre1.6.0_02/lib/tools.jar
Buildfile: build.xml does not exist!
Build failed

Quote:
The documentation says:
For the current version of Ant, you will also need a JDK installed on your
system, version 1.2 or later required, 1.5 or later strongly recommended.
The later the version of Java , the more Ant tasks you get.
Note #2: If a JDK is not present, only the JRE runtime, then many tasks will not work.

It also says in the section Setup to:
Optionally, set the JAVA_HOME environment variable (see the Advanced section below). This should be set to the directory where your JDK is in
stalled.
Where is JDK installed?

I'm unsure about setting it up for optional tasks.

Quote:
In Optional Tasks it says:
The external libraries required by each of the optional tasks is detailed in the Library
Dependencies section. These external libraries must be added to Ant's classpath, in any
of the following ways:
1. In ANT_HOME/lib. This makes the JAR files available to all Ant users and builds.
How do I add the external libraries to Ant's classpath?

Quote:
but in the section The CLASSPATH environment variable it says:
Do not ever set CLASSPATH. Ant does not need it, it only causes confusion and breaks things.
What does this mean?
 
Old 09-01-2008, 01:34 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104
In Slackware, the JDK is not installed by default - only the JRE.
You will have to install the JDK manually, it is located in the /extra directory of the Slackware 12.1 DVD (or on CDROM #4)

After installing the JDK, logout and login again, or run
Code:
. /etc/profile
to set the right environment for your build.

Eric
 
  


Reply


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
Apache's Ant martian Linux - Software 4 08-14-2007 07:52 PM
How to use "ant" from J2EE SDK instead of installed ant in Fedora ? pcuongx Linux - Server 2 02-27-2007 04:45 AM
Problems about ant simprince Programming 1 11-08-2005 09:53 AM
problem with ant os2 Programming 1 05-20-2005 12:13 AM
Jakarta Ant?? powadha Linux - Software 3 01-19-2004 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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