Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18272
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, Thanks a lot Tim. That was helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic