0

I am having a strange issue. I am using maven 3.2, java 1.6 and jboss 5.1. I am using all these old version because I have some system requirement. I am working on web application. I am getting an error
Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre6\..\lib\tools.jar ->

imperviously it was working fine. When I made some changes in code and when I did this from that time I am getting This error.

enter image description here

  1. I tried updating maven forcefully.
  2. I tried maven install from eclipse.
  3. Even I downloaded the missing jar and put into C:\Program Files\Java\jre6\..\lib\ this path.

and many more still I am getting this error. please help me.

Varun
  • 4,342
  • 19
  • 84
  • 119
  • Hi, see answers in this thread: http://stackoverflow.com/questions/25185634/maven-build-failed-fatal-error-compiling-tools-jar-not-found – L.Butz Aug 12 '15 at 13:52

2 Answers2

1

I think your eclipse is pointed to JRE not JDK. Can you point it to JDK and check?

1

Mistake you did is --- Your build path is pointing to the wrong JRE directory/folder. So, you have to change the build path to JRE folder(which is inside the JDK folder) rather not the JRE folder that's available outside the JDK.

Eclipse > Select Windows > properties > Java > Installed JREs

• Select the "jreX" under the Installed JREs list > Select "Edit" or double click

• Your JRE home directory location may be pointing to something like

JRE home: C:..\Java\jre1.x --- (which is wrong)

• Point to the right directory as follows:

JRE home: C:..\java\jdk1.x\jre --- (this is right)

• Finish.

Clean your project and compile it. It should work fine :)

Akhil
  • 368
  • 4
  • 16