The HotSpot virtual machine together with the JRE provides several important services to Java programs. These services include class loading, security, memory management and garbage collection, preemptive multithreading and thread synchronization, native method linking, and error and exception management.