5

I am trying to build jasperserver on linux. It uses ant and maven. While executing the ant command it gives this exception. I checked on the same path however the lib folder is not there at the same path. How can I resolve this issue?

Thanks!!

Vadzim
  • 24,954
  • 11
  • 143
  • 151
DMS
  • 808
  • 2
  • 20
  • 34
  • 2
    Are you sure you have installed a JDK? A mere JRE does not contain tools.jar. – mgaert Jan 13 '12 at 13:31
  • 1
    Possible duplicate of [Maven: Failed to resolve dependency: tools.jar](http://stackoverflow.com/questions/7860350), [Unable to locate tools.jar](http://stackoverflow.com/questions/5730815), [Unable to locate tools.jar](http://stackoverflow.com/questions/6676107), [Ant error when trying to build file, can't find tools.jar](http://stackoverflow.com/questions/2618281), [Ant + Vista 64 : “Unable to locate tools.jar”](http://stackoverflow.com/questions/4378535). – dma_k Jan 14 '12 at 18:35

5 Answers5

7

tools.jar is present only in jdk, not jre.

Vadzim
  • 24,954
  • 11
  • 143
  • 151
2

I have fixed this issue by installing jdk..

Thanks to all for reply ..

DMS
  • 808
  • 2
  • 20
  • 34
0

It could be that your eclipse is defaulting to your 32bit version of your jre. If you do everything right with JAVA_HOME set to C:\Program Files\Java\jdk1.6.0_21\bin and your running a 32bit version of eclipse you'll end up using something like C:\Program Files (x86)\Java\jre6\bin.

once you fix your jdk issue You will need to pass it on the end of a shortcut -vm "C:\Program Files (x86)\Java\jdk1.6.0_31\bin"

Or fix your JAVA_HOME

Other suggestions have been to make sure your eclipse is using the jdk not jre http://gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx

Josh
  • 482
  • 5
  • 12
0

Just for others reference:By default eclipse will point to jre not jdk. if you want to change default jre please got to window -> Preferences -> Java -> Installed JREs
click on add button select Standanrd VM then set JRE home. here you can provide your installed jdk path it will look like below in case of windows. C:\Program Files\Java\jdk1.8.0_101

Shemeem
  • 198
  • 2
  • 14
0

I saw the same message running Ant after a JVM update. I fixed it by setting JAVA_HOME to JDK.

Jeff Miller
  • 1,424
  • 1
  • 10
  • 19