简体   繁体   中英

Will updating Java overwrite everything in the JRE folder, or will it patch?

I'm think of increasing the maximum encryption key length by downloading security policy files from Oracle. They need to be placed in $JRE_HOME/lib/security to take effect. My question is, would this "tweak" be overwritten when upgrading Java to a major version, and maybe even from a minor version to another minor version?

Best regards Programmer Trond

Ideally, you would develop a repeatable process (such as a script) that sets up your environment.

  • Install JRE/JDK
  • Post configure JRE/JDK using script

That will simplify moving your application between computers and give you some confidence in your environment.

This may seem like overkill for your particular situation, but it's one of those good development habits that will scale for you.

Different major versions have different directories so adding JRE 8 will not touch JRE 7.

What happens exactly depends on your installer. If you use the tar.gz package it will create a new directory for every build, if you use RPM it will remove the old versions and add new ones. You need to check how RPM behaves if you modify a file, but I would assume it could be overwritten.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM