When talking about Java, we have to talk about Java's excellent portability, which is basically the biggest boast of Java. Once compiled, it runs everywhere. All of Java's operations come from its running method-managed by JVM (Java Virtual Machine. Because of the Minimum Operating System intersection, each platform can have an implementation mechanism to ensure the same effect. However, this feature also causes Java inefficiency. Why do programmers and users not like to use Java for desktop development? The main reasons are as follows: 1. the startup speed is slow: Java adopts JVM for hosting and running. when starting a Java program, the JVM must be loaded first, and then the class libraries required for Java are loaded in sequence, this requires a certain delay. 2. High memory usage: loading JVM consumes a lot of memory. Because Java adopts the mechanism of automatic garbage collection, memory collection is not automatically implemented by Java programs, but by JVM, in this way, you cannot manually release the memory immediately. Java does not provide a mechanism for manual garbage collection, but only provides a simple method for garbage collection. If the memory usage is not large, Java will never be recycled. 3. JRE needs to be installed. JRE (Java Runtime Environment) is the runtime environment of the Java program. This requires you to install an additional application. The latest version of jre5.0 is about 15 MB, this makes the installation packages of any Java Desktop Application more than 15 MB, even if a simple "Hello World" program. 4. Slow response speed: The standard interface development kit provided by JDK is AWT and swing. Their underlying implementation does not directly call the small window components provided by the operating system itself, but uses another lightweight implementation mechanism to simulate the window widgets, in order to ensure the same effect in all operating systems. However, it looks awkward, inefficient, and slow response. 5. Java layout: Java adopts the layout policy to ensure that the performance of each operating system is the same. In this way, we can't achieve the desired result through simple visual drag through window program development, but we need to perform complicated layout manager settings. Every Java developer has to deal with complicated layout manager programming on the learning interface programming. 6. The number of system APIs that can be manipulated is too small: because of the system intersection, Java can only operate the APIs that are consistent with all operating systems. This will greatly reduce the functionality of desktop applications. Many functions are not available to Java developers. Even the most basic APIs such as disk space cannot be used by Java programmers.
Seeing this article reminds me of one thing I heard some time ago. A small information system developed by Java originally adopts the B/S structure, however, because the client machine configuration of the customer side is too bad (it is said that the memory is only 128 MB), instead of using dephi development, C/S structure. I didn't understand why I switched to dephi. I asked the programmer later and the results were unclear. until I saw this article, haha. so it turns out. I understand why Ajax will appear later, and I understand the popularity of Ajax over the past two years.