score:8

Accepted answer

best answer found at

it happened for me after un-installing java and installing new version.

all i have to do is in eclipse open installed jres from windows --> preferences --> java --> installed jres

then add new jre information. details can be found here

score:0

the last answer is absolutely correct, however a fast track way is to delete the project reference from eclipse (make sure to keep unchecked delete source) and import your project folder again. this way the project configurations are reset by eclipse using the new jdk. but a wonderful post it did help me.

score:0

after java update ant build failed and the below steps fixed it .

right click on build.xml-run as-external tools go to jre tab and check the box to use the jre same as workspace.

score:0

removed below file and build maven project again, worked for me.

.metadata.plugins\org.eclipse.debug.core.launches\.xml.launch"

score:0

(ant file)run as--> external tool configuations, go to jre tab and choose jre

score:2

just delete the below file

"<your eclipse workspace location>\.metadata\.plugins\org.eclipse.debug.core\.launches\<projectname>.xml.launch"

link to post

score:4

you can change what jre the ant bulid file is launched with inside eclipse.

right click on the ant file in the ant view and select "run as"->"ant..." from the context menu.

then in the launch dialog select the jre tab. note the error message at the top if it can't find the jre that it expects.

select a jre that you have installed or manage install a new one. you can also add vm arguments (enable logging or change memory alocation) if you need to in this dialog.

score:5

this is a preferred way tell projects which jdk container to use, especially true if two or more devs are using the same version controlled eclipse project folder.

window/preferences/java/installed jres
list one or more jdks installed on your computer. eclipse defaults name to jdk1.x.x_xx you should keep it as is. never link project build settings directly to use these names.

window/preferences/java/installed jres/execution environments
list of common jvm environments such as javase-1.6 and javase-1-7 names. click rows and choose jre instance on the right side panel. these names are common and all team members should already have them in eclipse installation.

step 1: this is where you may accidentally have nothing chosen if jres were uninstalled or names changed in installedjres setting. you may get

specified vm install not found error dialog.

step 2: choose 2nd mouse on build.xml file/run as/ant build... popup menu entry. click on jre tab and choose execution environment. this may have obsolete value from the previous jdk values.

project properties/java build path/libraries
add library.../jre system library/(x)execution environment
choose execution environment to be used for this project. team members may not have exact _xx jdk build but they can use the same version controlled eclipse project settings. execution environment mapping hides user specific details.

score:5

just had this issue & the solution above does not work, atleast not for me.

instead i went the solution provided here:http://www.javaworkspace.com/vmnotfound.do

essentially you go to the directory c:\projects\workspace.metadata.plugins\org.eclipse.debug.core.launches

in there search for the string of the jdk that that eclipse is moaining about & change it to the name of your installed jdk that you want to use that eclipse knows about.

score:27

in my case it happen as i have changed my jre.

solution :

right click on your ant script > run as > external tool configurations... > go to jre tab > select jre

hope this help.

thanks, sagar vyas

score:231

  1. right click on build.xml
  2. go to "run as" >> "external tools configurations..."
  3. it shall open new window
  4. go to jre tab
  5. select proper jre if missing (sometimes jre tabs shows error mark on that.)

for more technical details or issue similar to this find my blog here.


Related Query

More Query from same tag