Upgraded my JDK to 1.5.0_06 today, and installed Eclipse 3.2 at the same time. I knew I bit off more than I could chew. After the upgrade (including downloading all the updates from the Calypso project), I went to debug a web app, so I switched over to the J2EE perspective and tried to start Tomcat from the server panel. I was greeted with a nice friendly error message:
The JRE could not be found. Edit the server and change the JRE location.
Hmm. I then selected Preferences from the Window menu, expanded Server, selected Installed Runtimes, then clicked on the Tomcat 5.5 server I was using and hit the edit button. "Workbench default JRE" was selected. "Ah," I though, "I must have the default JRE set wrong!" I scrolled back up in the preferences window, selected Java then Installed Runtimes, which according to this Eclipse help page is how you set the default JRE. The window showed jre1.5.0_06 selected as the default JRE, which was the one I just installed (and the only one now on my system).
Something was not right. I went back to Server/Installed Runtimes, hit Edit on Tomcat again, then instead of selecting "Workbench default JRE" I manually selected "jre1.5.0_06". Viola! Everything started working. However, this means that I will probably have to go through this again the next time I upgrade my JDK/JRE, because Eclipse is not picking up it's own defaults. Yuck.
Update (Aug 10, 2006):
I did a little more playing around with this, and it looks like the JRE for a server runtime is assigned when the server is created, and is not updated when the default JRE changes. I was able to verify this by going to Window/Preferences/Server/Installed Runtimes, deleting an existing Tomcat 5.5 server (one that was generating the error), then creating a new one. The new one picked up the updated JRE.
Trackback: http://tb.blog.youkuaiyun.com/TrackBack.aspx?PostId=1531099