16
votes

I've got a project I've been building on Eclipse Ganymede targetted at tomcat 6.0, I've imported it into Europa and I need it to run on apache Tomcat 5.5

I can't find the reference to where the runtime is set to 6.0 to remove it. I've tried going to Windows > preferences > Server and I've installed the 5.5 runtime.

I can't however seem to find where the reference is to runtime 6.0 to remove it.

Any help would be appreciated.

Update:

I cant find any reference to Tomcat v6.0 in my build path, there is a reference to the servlet-api.jar of tomcat 5.5 though...

11
When you create a Web project, you select a Runtime and Eclipse adds it to your Build Path. If it isn't there, something went wrong with the importing. - kgiannakakis

11 Answers

28
votes

When Eclipse is up and running, choose preferences from the window menu. Choose from the bar on the left: Server, Runtime Environments.

Click the button Add, choose the version you want.

To remove the 6.0 reference, goto the libraries tab.

10
votes

You can delete a Runtime easily from here, with no mess up:

Windows->Preferences->Server->Runtime Enviroments

8
votes

I had a similar problem. I had a prject referring to a no more existing Tomcat instance. I was not able to remove Tomcat from "Server" and "Runtime Environments" from UI (delete button always gray),so I solved the problem deleting all the reference from the filesystem:

In project folder check files:

  • .classpath
  • .settings/org.eclipse.wst.common.project.facet.core.xml

In workspace folder check:

  • .metadata.plugins\org.eclipse.debug.core
  • .metadata.plugins\org.eclipse.wst.server.core
  • .metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jst.server.tomcat.core.prefs

Maybe a bit brutal but I didn't find a better solution.

3
votes

First, open the eclipse preferences,

eclipse preferences

then find the sever runtime environments,

eclipse sever runtime environments

you can now delete as you wish.

2
votes

Unloading the project and reloading it fixed it... Man I love Eclipse...

2
votes

This was tested over Eclipse Luna 4.4.2

In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings. delete the following two files:

  • org.eclipse.wst.server.core.prefs
  • org.eclipse.jst.server.tomcat.core.prefs

Restart Eclipse

1
votes

Delete the old server and add a new server. I had the same problem due to the fact that i changed the runtime environment to Java EE (for a webservice) and later had problems running my local apps. All i did was to delete and create a new server instance with apache runtime.

1
votes

after removing the installed runtime from eclipse, do the following:

1] Close Eclipse

2] In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings. delete the following two files:
    org.eclipse.wst.server.core.prefs
    org.eclipse.jst.server.tomcat.core.prefs

3] Restart Eclipse

ref: http://crunchify.com/eclipse-how-to-fix-installing-apache-tomcat-server-issue-blank-server-name-field/

0
votes

Open the Build Path and go to the Libraries tab. Remove the Apache Tomcat 6.0 library and add 5.5. This is the library that your project uses to build it self.

You can add new runtimes for running your project in the Servers view (Right-Click, Add new Server)

0
votes

You can also just define a new server for that, and specify it there, also you can change server configuration just by double clicking on it you will see window with it's properties.

0
votes

Yep, I have eclipse Version: Indigo Service Release 2; Build id: 20120216-1857, unfortunately deleting the workspace solve the problem with having old Target Runtime. Don't forget to copy all your project work if there is no source control ;) ....