wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Unable to figure out which JRE Lib is being used by Ant. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Unable to figure out which JRE Lib is being used by Ant. " Watch "Unable to figure out which JRE Lib is being used by Ant. " New topic
Author

Unable to figure out which JRE Lib is being used by Ant.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi,

I am trying to compile some old project using existing ANT script. But i am getting below compilation error message.



But when i specify ant -lib D:\bea\jdk160_05\jre\lib as a lookup path for classes, everything works fine.

I am not able to understand why do i have to specify location of the JRE lib ? Why it's not picking up. And which JRE ant is referring to ?

how do i get to know which JRE Lib is being referred when i run Ant command.

And when i run java -version it shows correct JRE and JDK version

d:\workspace\SWAppEar>java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)


Jigar Naik


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Ant should be using the JDK that your JAVA_HOME environment variable points to when you invoke Ant. If JAVA_HOME is not set, it will try to locate a JDK.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Ok, Thanks a lot Tim. That was helpful.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to figure out which JRE Lib is being used by Ant.
 
Similar Threads
problem using javac with -classpath option
New to Java and trying to work with an existing app
Ant building error
JSP Precompilation using ANT
Exception in displaying data in a pdf format