Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens to running Java processes if I install a new version of the JDK?

Tags:

java

linux

jvm

I am wondering what happens with running Java processes if I update the JDK on a Debian machine. The answer is probably the same for other systems as well, I just wanted to be more explicit about my environment.

With update I mean that the newer JDK will be installed next to the existing one, and the symlink /usr/lib/jvm/default-java will be changed to the folder of the new JDK.

Folder structure after the update:

  • /usr/lib/jvm/default-java -> /usr/lib/jvm/jdk1.7.0_79
  • /usr/lib/jvm/jdk1.7.0_21 # old version
  • /usr/lib/jvm/jdk1.7.0_79 # new version

Will the running processes be affected by this change?

like image 770
Michael Küller Avatar asked Sep 06 '25 12:09

Michael Küller


1 Answers

The running processes are running off of the real JVM executable, not off of the symbolic link.

So, they will continue to run, but they will not switch over to the new JVM version you've just installed until you restart them.

like image 119
durron597 Avatar answered Sep 10 '25 00:09

durron597