Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Running the wrong version of Java(JAVA_HOME is set to jdk1.8, but when I start Tomcat in eclipse, it is using jdk13)
Running the wrong version of Java [message #1835586] Mon, 07 December 2020 16:45 Go to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 103
Registered: October 2014
Senior Member
When I try to run tomcat 8.0.53 in eclipse as the server, it will not start because it is looking for java at:
INFO: Java Home: /usr/share/jdk-13.0.2

I have JAVA_HOME set to /usr/share/jdk1.8.0_261.

I have been looking through eclipse IDE and have yet to find any place where jdk-13.0.2 is mentioned. (BTW I do have jdk13 installed at /usr/share/jdk-13.0.2).

I have also looked at the eclipse.ini file and did not see jdk-13.0.2 referenced.

Can someone explain how sync up Eclipse with my environment variable $JAVA_HOME? Or where the java home gets set in Eclipse?

Jim A.
Re: Running the wrong version of Java [message #1835587 is a reply to message #1835586] Mon, 07 December 2020 17:01 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4044
Registered: July 2009
Senior Member

Your IDE might be working with different applications and app servers all vying for different Java runtime versions. Don't expect JAVA_HOME set outside of Eclipse
to be paid any attention inside of Eclipse.

In your Servers/Runtime Environments preference page, what JRE is that Tomcat server runtime set to use?


Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Running the wrong version of Java [message #1835589 is a reply to message #1835587] Mon, 07 December 2020 18:19 Go to previous messageGo to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 103
Registered: October 2014
Senior Member

--> "In your Servers/Runtime Environments preference page"

First off, thank you for your response.

If I go to the tab labeled 'Servers', I have Tomcat 8 and 9. For now, I am ignoring Tomcat 9.0 and I am working with Tomcat 8.0.85. If I right click on Tomcat server 8.0, and select preferences, a page pops titled "Properties for Tomcat v8.0 Server at localhost", but there is no indication there for what JRE is being used.

I also tried a right click on 'Servers' in Project Explorer, followed by selecting 'Properties'. That popped up a page named, "Properties for Servers", but I could not find a reference to a JRE there either.

I suspect you mean a different preference page, but as yet, I have not found it. I'm sorry to ask for more specific instructions, but I am not sure where else to try. Can you give an addition pointer?

Jim A.
Re: Running the wrong version of Java [message #1835594 is a reply to message #1835589] Mon, 07 December 2020 22:34 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4044
Registered: July 2009
Senior Member

On the Window menu (or the application menu on macOS), you'll find an action to open the Preferences dialog. Servers is a category
there, and within it, there is a page called Runtime Environments. Don't confuse this with the contents of the Servers View that you
mentioned. The preference page sets up the runtimes on their own--which version it is, where it's located, and which JRE is used. What
you're seeing in the view are different instances of that runtime, each potentially configured with different JNDI resources, applications,
and port numbers. You always need at least one instance to actually run your application, but you can make more if you want.

You can also get there using Find Actions with Ctrl+3 or Cmd+3 and searching for "Runtimes".


Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Mon, 07 December 2020 22:38]

Report message to a moderator

Previous Topic:Plugin development in eclipse
Next Topic:Can someone tell me the difference between RC1, M1,M2,M3 release packages?
Goto Forum:
  


Current Time: Sun May 09 02:40:58 GMT 2021

Powered by FUDForum. Page generated in 0.03279 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top