Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

JDK version on security check

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. If you have a minute, I am trying to figure out the "end of support" for java versions. I was given the following security zing and I remember explicitly updating to 9 from 8 to be "up to date". This was indeed around April 2018 when that 9 version was the latest. However, this security scan program is saying one of the 8 incarnations is a "latest version". Is this accurate and wouldn't higher versions naturally have everything the lower version has and is supported? Thank you very much for reading...

 Path              : ...Java9/.../java.exe

 Installed version : 1.9.0_01

 Latest versions   : 1.8.0_261 / 1.11.0_8 / 1.14.0_2

 Support dates     : 2018-04-01 (end of life)
 
Sheriff
Posts: 15913
265
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

See if this page helps: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
 
Saloon Keeper
Posts: 6625
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Unless you like living on the edge, you may wish to use Long-Term-Support (LTS) versions. At the moment, those are Java 8 and Java 11. At the moment, all non-LTS versions, including the current Java 15, have an EOL date of 6 months after release - which is why it is not recommended to use those on production systems.

If by "support" you mean Oracle's paid support, check out https://www.oracle.com/java/technologies/java-se-support-roadmap.html
 
Junilu Lacar
Sheriff
Posts: 15913
265
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thomas Griffith wrote:Is this accurate and wouldn't higher versions naturally have everything the lower version has and is supported?


Not necessarily -- there are deprecations in new versions as well and somewhere down the line those deprecations will no longer be supported.
 
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every three years, Java will receive a "long term support" version, or LTS. These versions receive security updates, even if they don't receive feature updates.

Java 8 and Java 11 are the current LTS versions, Java 15 is the latest (non-LTS) version, and Java 17 will be the next LTS version.

Having Java 9 doesn't make much sense because it won't receive security updates. Either update to Java 11, or if you need something older than Java 11, use Java 8. If you don't care about long term support, use Java 15.
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. So from that chart on the oracle site, it looks like 8 is the better version rather than 11, longer support? Why couldn't I leave well enough alone at the time...uuuugh.
 
Stephan van Hulst
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Java 8 is a special version because Java 9 introduced big changes that a lot of older software can't handle.

You should only use Java 8 if you have a good reason to, for instance if you run applications or application containers that are incompatible with Java 9's module system.

If you don't need pre-9 compatibility, or if you don't know that you do, update to Java 11.
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if my legacy apps (running on Tomcat 9) will run on jvm 11. They were running on 8 then I updated the jvm to 9...

I'm not deploying new apps to this Tomcat container, it's strictly there to run the legacies.
 
Stephan van Hulst
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your applications already run on Java 9, they will likely also run on Java 11.

A reason to use Java 8 might be if you were using Tomcat 6 or something like that.
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much. I guess it still looks like support date for 8 is four plus years longer than 11. Would you consider that as a factor or will the 11 date be rolling?

Thank you so much again.
 
Saloon Keeper
Posts: 22630
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:If your applications already run on Java 9, they will likely also run on Java 11.

A reason to use Java 8 might be if you were using Tomcat 6 or something like that.



Please don't, though. I don't think Tomcat 6 has been supported for several years itself. What benefit using a supported JDK version for an unsupported server version?
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Stephan van Hulst wrote:If your applications already run on Java 9, they will likely also run on Java 11.

A reason to use Java 8 might be if you were using Tomcat 6 or something like that.



Please don't, though. I don't think Tomcat 6 has been supported for several years itself. What benefit using a supported JDK version for an unsupported server version?



The current environment is Tomcat 9 with JDK/JRE 9... I had JDK 8...
 
Stephan van Hulst
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:What benefit using a supported JDK version for an unsupported server version?


I must sadly report that some government agencies believe that "leave the poor old application container alone" is more important than keeping it up to date.

I rather write my applications in an environment that emulates that of my customer than find out my applications are not compatible later. It's customers like these, and not my application, that dictate the system requirements. I too wound rather see it differently.
 
Master Rancher
Posts: 4698
49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thomas Griffith wrote:

The current environment is Tomcat 9 with JDK/JRE 9... I had JDK 8...



If that's the case then, as I think has been said above, move up to 11, not down to 8, unless there are other good reasons not to (eg client environment).
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:

Thomas Griffith wrote:

The current environment is Tomcat 9 with JDK/JRE 9... I had JDK 8...



If that's the case then, as I think has been said above, move up to 11, not down to 8, unless there are other good reasons not to (eg client environment).



thank you...but what of the later end of long term support date for 8 (2030) as opposed to 11 (2026)?
 
Stephan van Hulst
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for that is probably because, as I said before, the difference between Java 8 and Java 9 was HUGE and a lot of older applications were not compatible with Java 9. Applications that want to migrate from Java 8 now have 10 years to do it.

You said your applications run fine on Java 9. There is absolutely no reason not to upgrade to Java 11. By the time support for Java 11 has ended, Java 17 will have been released for 5 years.
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:The reason for that is probably because, as I said before, the difference between Java 8 and Java 9 was HUGE and a lot of older applications were not compatible with Java 9. Applications that want to migrate from Java 8 now have 10 years to do it.

You said your applications run fine on Java 9. There is absolutely no reason not to upgrade to Java 11. By the time support for Java 11 has ended, Java 17 will have been released for 5 years.



ok. I'll try 11. I posted in the Tomcat forum but I was wondering if anybody has used the tomcat9w.exe GUI (Tomcat running as a windows service) to repoint the JVM to a newer version of Java? It seems straight-forward, just change it and I am guessing restart the service. But it looks too easy...making me uneasy...

When I made the jump form JVM 8 to 9, I reinstalled the entire Tomcat service but obviously, if this is easy...
 
Stephan van Hulst
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah it should work just fine. I've used the Tomcat service manager to stop and start the service on test servers and I don't know why it shouldn't be able to switch to a different JVM that easily as well. I know that my IDE can point my Tomcat installation to a different JVM without any issues, and it probably does this by calling the service manager.
 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I found something interesting in tomcat9w.exe GUI. The Java Virtual Machine field in the Java tab indicates

C:...\jdk1.8.0_131\bin\server\jvm.dll

however, the Manager App for the Tomcat service (via browser) indicates JVM version 9.0.1.11...

I changed the tomcat9w.exe to C:...jdk11...etc... but no effect. It's like the tomcat9w.exe settings are completely ignored.

??

 
Thomas Griffith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok... I found that Tomcat9w.exe appears to be pointing to a previous service I had installed... with the default Tomcat9 service name.

Is it possible to redirect Tomcat9w.exe to my current service name, Tomcat99?

thank you.

 
Stephan van Hulst
Saloon Keeper
Posts: 12404
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Uh as far as I know each Tomcat installation has its own service manager application that modifies a configuration file that's part of the same Tomcat installation directory. It doesn't point to any particular service. Instead, the background service points to a particular Tomcat installation.

I think an easy way to fix this is to cd to the bin folder of your Tomcat installation directory and run "service uninstall" followed by "service install". I think these scripts assume that the service is named Tomcat9. If you want to use Tomcat99 as a service name, use "tomcat9 //DS/Tomcat99" followed by "service install Tomcat99".
 
Thomas Griffith
Greenhorn
Posts: 22
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Uh as far as I know each Tomcat installation has its own service manager application that modifies a configuration file that's part of the same Tomcat installation directory. It doesn't point to any particular service. Instead, the background service points to a particular Tomcat installation.

I think an easy way to fix this is to cd to the bin folder of your Tomcat installation directory and run "service uninstall" followed by "service install". I think these scripts assume that the service is named Tomcat9. If you want to use Tomcat99 as a service name, use "tomcat9 //DS/Tomcat99" followed by "service install Tomcat99".



Hi. Thank you so much. The file name does have to match the windows service name. I was able to perform a hybrid of this solution by copying Tomcat9w.exe, renaming Tomcat99w.exe and as you said, it maps to the Tomcat99 Windows service. From there, i was able to change the service JVM. Afterwards, I removed the previous Tomcat9 windows service via DOS command on the server. Thank you.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic