JVM JIT and running mode

JIT At the beginning of Java, all code are executed in interpreted manner, I.E execute code line by line after interpretation which would result in slowness. Especially for code that are frequently executed. So later JIT was introduced so that when when some code are frequently executed, it becomes ‘Hot Spot Code’ and would be…

How Java Debug works

You can just attach your IDE to a running application (which has been runned for debug as we’ll see later), or you can even debug it from command line. And the application you debug can even be be in a different machine. The magic lies in where the debug information actually resides. Apparently people normally…

Class Loaders and the Parent-Delegation Model a

How the Java Launcher Finds Classes The Java launcher, java, initiates the Java virtual machine. The virtual machine searches for and loads classes in this order: Bootstrap classes – Classes that comprise the Java platform, including the classes in rt.jar and several other important jar files. Bootstrap classes are in the rt.jar and several other jar…

get tomcat hot swap work with intellij

It usually takes a lot of time whenever you’re recompiling a Java web project. The IDE would usually recompile the entire project, package them into a war and have it redeployed on your  application server (i.e., Tomcat) then letting the server reinitialize itself. It takes a lot of time, and it just gets worse as your…

JVM Architecture

The Architecture of the Java Virtual Machine Figure below shows a block diagram of the Java virtual machine that includes the major subsystems and memory areas described in the specification. As mentioned in previous chapters, each Java virtual machine has a class loader subsystem: a mechanism for loading types (classes and interfaces) given fully qualified names….