LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-22-2007, 11:55 AM   #1
manolakis
Member
 
Registered: Nov 2006
Distribution: xubuntu
Posts: 464

Rep: Reputation: 37
Ant problem with JAVA_HOME


Hi there
I will be really glad if anyone was familiar with the following?
Quote:
BT ant $ ant all
Unable to locate tools.jar. Expected to find it in /usr/lib/java/lib/tools.jar
Buildfile: build.xml

initialise:

compile:
[javac] Compiling 180 source files to /home/manos/Desktop/downloads/jcommon-1.0.8/build

BUILD FAILED
/home/manos/Desktop/downloads/jcommon-1.0.8/ant/build.xml:51: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/java"

Total time: 1 second
I recently downloaded Ant and I set the environment variables to /etc/profile
This is how i set up the variables in the end of etc/profile
Quote:
# For non-root users, add the current directory to the search path:
if [ ! "`id -u`" = "0" ]; then
PATH=/home/manos/Desktop/downloads/jdk1.6.0/bin/:$PATH
export ANT_HOME=/home/manos/Desktop/downloads/apache-ant-1.7.0/
export PATH="${PATH}:${ANT_HOME}/bin"
fi
Any ideas how can i set JAVA_HOME ?

Thanks for your time
manolakis
 
Old 03-22-2007, 12:02 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
In /etc/profile:
JAVA_HOME=/path/to/jdk
export JAVA_HOME
 
  


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
problem setting JAVA_HOME pkpro1 Linux - General 5 11-25-2007 08:49 AM
How to use "ant" from J2EE SDK instead of installed ant in Fedora ? pcuongx Linux - Server 2 02-27-2007 04:45 AM
ANT and JAVA_HOME weird... double bin dir latino Linux - Software 3 01-07-2007 08:34 PM
Java - JAVA_HOME problem after upgrade ssa2204 Linux - Newbie 5 08-24-2006 06:32 PM
Problem setting JAVA_HOME when installing jdk1.5 RVDowning Mandriva 4 08-02-2006 07:38 AM

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

All times are GMT -5. The time now is 03:50 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