my dog learned polymorphism
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


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: 761
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: 17023
    
  26

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: 761
Ok, Thanks a lot Tim. That was helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to figure out which JRE Lib is being used by Ant.
 
It's not a secret anymore!