Why is Java not easy to hot deploy?
扔个三星炸死你
扔个三星炸死你 2017-06-14 10:51:37
0
3
869

My question is
I modify the java code, and then the page requests execution, and the server automatically compiles it into bytecode and sends it to the jvm for running. Why do we need to restart the jvm to execute the modified code?

扔个三星炸死你
扔个三星炸死你

reply all(3)
滿天的星座

Java has many hot deployment solutions. https://www.google.com/search...

But hot deployment will affect performance, and in a production environment, the frequency of Java code deployment is very low.

So, hot deployment is generally enabled in the development environment.

学习ing

Frequent compilation of virtual machines will occupy Jvm running memory, affect GC, and website performance will be reduced

某草草

The essence of hot deployment is to replace the class, which means that the old class needs to be kicked out of the memory and the new class reloaded. This involves unloading the class, and one of the conditions for unloading a class is that its ClassLoader can Picked up by the garbage collection. On the other hand, if the ClassLoader cannot be recycled, then java can only be restarted.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template