40

I'm trying to launch a server on my tomcat 7 on my eclipse indigo EE
and I get the following error:

"'starting Tomcat v7.0 server at localhost' has encountered a problem.
The specified JRE installation does not exist"

I checked the build path configuration and on the libraries section I have the
JDK7 as JRE System Libraray and when I check "Installed JREs..." the correct
path is there - "C:\Program Files\Java\jdk1.7.0_01".

What else can be done? Many thanks.

p.s. - I'm also using maven 3.0.3

tomermes
  • 22,950
  • 16
  • 43
  • 67
  • What JRE version is set in the catalina batch file? Also do you have JAVA_HOME and JRE_HOME set as environment variables? – Hunter McMillen Jun 23 '12 at 14:30
  • just go to server overview page and in the Runtchime Environment check if the selected JRE is the installed one or its default system. – chaosguru Jun 23 '12 at 14:43
  • I described a **more general solution to such JRE/JDK setups** here: http://stackoverflow.com/a/31693702/1915920 (because it likely could cause trouble for other eclipse tools and plugins as well that need to be updated) – Andreas Covidiot Jul 29 '15 at 07:26

14 Answers14

90

Double click on the server to bring up the Overview.

Click on Runtime Environment.

Select the JRE from the dropdown list. You may need to set this up by clicking on Installed JREs and clicking Add.

bdetweiler
  • 1,544
  • 1
  • 16
  • 27
26

If the instructions above did not help you can do the following:

1- from the run menu choose "Run configurations..."

2- Choose your maven run profile and then click on the "JRE" tab.

3- Select "Alternate JRE" and from the drop down select "jdk1.7xxx" (or whatever jdk you want to use" you can also select the workspace default jre.

I was facing the same problem and this helped.

Baby Groot
  • 4,637
  • 39
  • 52
  • 71
Ali
  • 379
  • 4
  • 4
7

Go to the build file.

Right click on it.

Do the following as per the screenshots

enter image description here

enter image description here

Sireesh Yarlagadda
  • 12,978
  • 3
  • 74
  • 76
6

Window-->Prefenerces-->Server-->Runtime Environment; like this....enter image description here

Edit your Apache,and select your jdk dir....

BWA
  • 5,672
  • 7
  • 34
  • 45
d.zoro
  • 61
  • 1
  • 2
4

Go to PropertiesJava Build PathLibraries.

Here you will see a red cross on the library whose path is not correct.

Select this library, click the Edit button, and change it to the correct path.

Daniel A.A. Pelsmaeker
  • 47,471
  • 20
  • 111
  • 157
BERGUIGA Mohamed Amine
  • 6,094
  • 3
  • 40
  • 38
4

Here is a solution with pictures

http://javahonk.com/specified-jre-installation-does-not-exist/

ds011591
  • 494
  • 8
  • 19
2

It worked after running "mvn install clean -P prepare"

tomermes
  • 22,950
  • 16
  • 43
  • 67
1

For Eclipse MARS, for maven projects.

After you install the new JRE as explained (for instance here: http://javahonk.com/specified-jre-installation-does-not-exist/), don't use your old configuration, BUT create a new configuration.

Guy L
  • 2,824
  • 2
  • 27
  • 37
1

Updated the Java , JRE. so I have faced this same issue, I have tried all this but i continued with this issue. then after that, i have removed the server from application and then added new server and with that i have mentioned new JRE version now its working fine.

Sasi Dhivya
  • 501
  • 2
  • 7
  • 25
0

Open eclipse and find the server tab and try to open it. There click on Runtime Environment

Select the JRE from the dropdown list to set this up by clicking Installed JREs and Add.

Happie
  • 1
0

If you use Maven, try:

EclipseMavenJRE_1

EclipseMavenJRE_2

andrew
  • 3,083
  • 4
  • 24
  • 29
0

Window-->Prefenerces-->Server-->Runtime Environment; like this.... enter image description here

Edit your Apache,and select your jdk dir....

d.zoro
  • 61
  • 1
  • 2
0

It worked after updating Server Runtime environment JRE .

0

At my case, I've changed the JRE installed at Eclipse and still the messages came out.

So,

1 - Right click at the JBoss Server > Open Lauch Configuration

2 - Select tab Classpath and click "Restore Default Entries"

3 - Close the window and Right click again the Jboss Server

4 - Select Properties > General

5 - Click two times 'Switch Location' (it returns to [workspace
metadata])

6 - Click Apply and Close

Afterwards, a new right click at Jboss Server > Clean, and the Jboss Server stopped the message.

Hope it helps.