Thursday, September 22, 2011

Eclipse/ANT Error Specified VM install not found



My company provided me new laptop and happily I moved from my old rusted desktop to new shining, powerful and portable laptop. Everything was copied without problem and I started working. But is not it strange to see everything working perfectly fine? I was stunned but happy as well. 

I started using the installed application. Eclipse was working fine until I tried building (Using ant) my application. Ant showed me a scary popup displaying "Specified VM Not found..." 



Simple solution, there is JDK/JRE problem with the system. Correct the JRE and JDK of the project. I did, but it did not work. I googled and found following 2 solutions.

You might even face this problem when you upgrade ant plug-in.

Solution 1
Remove the file which stores build information about the project and restart the eclipse. You can find the respective file in "${PROJECT_WORKSPACE}/.metadata/.plugins/org.eclipse.debug.core/.launches/${PROJECT_NAME} build.xml.launch"

Solution 2 (Location and Screen Shot may differ for different Eclipse Version. Following screen shot and paths are valid for Eclipse Version 3.7)

Go to RUN->External Tools ->External Tools Configurations… 


It will open console below. Select your build.xml(in my case it is abc build.xml). Move to JRE tab. 



Select the appropriate JRE.



Apply the changes and run the build xml. No need to restart eclipse, and you will not face the problem again.

Bmmm, Solved. Saved time.

29 comments:

  1. Thanks, saved my day! :)

    ReplyDelete
  2. Thankyou so much for posting this and saving me a headache.

    ReplyDelete
  3. Thanks you so much!!

    ReplyDelete
  4. The thread that keeps on giving. Thank you!

    ReplyDelete
  5. Thanks a lot for this suggestion. It helped a lot!
    George

    ReplyDelete
  6. Thank you. Saved my day

    ReplyDelete
  7. +1 internet for you.

    ReplyDelete
  8. SWEEEEEEEETTTTTTTT !!!! Saved me pain in my a**

    ReplyDelete
  9. I have not ever received so many thanks on a single post... It is my pleasure to help you all. :)

    ReplyDelete
  10. Thanks for your post. It helped a lot.

    ReplyDelete
  11. Fixed it for me! Thanks!

    ReplyDelete
  12. Thank you mahn! Thank you very much! :)

    ReplyDelete
  13. Wow!! Thanks a lot..

    ReplyDelete
  14. Maybe the 3rd time I've used your article to solve this. Thank you much!!

    ReplyDelete
  15. thanks it worked for me souktion 2

    ReplyDelete
  16. many thanks for you help

    ReplyDelete
  17. Thanks you.. it worked for me..

    ReplyDelete
  18. Really good!
    Thanks

    ReplyDelete
  19. Thank you! Solution number 2 is great!

    ReplyDelete