Suppose I have a file called A.java, when I compile it, it now does A.class, suppose I open two command lines, and at the same time I press java A command in this command message. will jvm load the class twice?
No JVM: you start two separate processes with your heap, class loader, etc. The class will be loaded twice, once in each JVM, separately from the other.
If you run the java command at two command prompts, two JVMs will be created, and your class will be loaded into each JVM classloader separately.
Yes, the class will be loaded twice.
In addition, a class can be loaded more than once in a single JVM, but with different class hierarchies.
Source: https://habr.com/ru/post/1341932/More articles:How widespread is OAuth? - oauthIs there a Spring Security function DefaultLdapAuthoritiesPopulator that supports nested groups? - javaChanging the behavior of General :: stop and the main loop - wolfram-mathematicaPerl reading a huge excel file - perlThe content of the struts-config element type must match "(datasource ?, Form-beans? - javaMouse pointer issue in Java Swing - javaUse FFMPEG on Android - androidEnable () in EF4 using RIA Services domain service does not load! - silverlightHow do I link my app to the App Store developer page? - iosExchange memory between Java and PHP? - javaAll Articles