Mobile phones 15 years ago did not have a jvm virtual machine, so why can they run Java games?

 

In the early 2000s, with the development of mobile communication technology, mobile phones gradually became popular. The functions of mobile phones in that era were relatively single, mainly used for making calls and sending text messages. However, with the advancement of technology, people started playing games on mobile phones, and the most popular games among them are Java games. At that time, Symbian phones were among the most popular phones on the market. However, there is a problem that bothers many people, that is, Symbian mobile phones do not have a jvm virtual machine, so why can they still run Java games?

 

First of all, we need to understand what is a Java game and a jvm virtual machine. Java games are mobile games developed on the Java platform, and they are usually written in Java code. The jvm virtual machine is the core component of the Java language, it can run Java bytecode, and provides cross-platform support for Java programs.

However, Symbian phones at that time did not have a built-in jvm virtual machine. So why are these phones still running Java games?

In fact, Symbian mobile phones have not completely abandoned Java technology. Instead, it uses a technology called Java ME . Java ME is a lightweight version of the Java platform designed for embedded devices such as cell phones and other portable devices. Java ME provides a smaller, more flexible, and more portable virtual machine and class libraries than standard Java, making it ideal for use on mobile devices.

 

The Java ME virtual machine is much smaller than the standard jvm virtual machine. This is because Java ME is specifically designed for mobile devices, so it requires less memory and processor resources. The Java ME virtual machine also has faster startup times and faster execution. These features make Java ME an ideal choice for running Java games on Symbian phones.

However, even with the Java ME virtual machine, some additional technology is still required to make Java games run on Symbian phones. One of the important technologies is MIDP (Mobile Information Device Profile). MIDP is a subset of Java ME that provides a set of APIs (Application Programming Interface) for mobile devices for developing Java applications and games. MIDP also provides some class libraries and tools related to mobile devices, such as interface design, network connection and multimedia processing.

 

Running Java games on Symbian mobile phones requires another technology, that is CLDC (Connected Limited Device Configuration). CLDC is another subset of Java ME designed specifically for resource-constrained devices, such as mobile phones and embedded devices. CLDC includes a minimal set of Java virtual machine specifications and class libraries that can run on resource-constrained devices.

In order to run Java games on Symbian phones, developers need to use Java ME, MIDP and CLDC to create games. They had to write code, compile it to Java bytecode, and convert the bytecode into a format Symbian phones could understand . This format is usually Nokia's Symbian format, because Symbian phones are developed by Nokia.

Once a Java game is converted to Symbian format, it can be installed on a Symbian phone and run on the Java ME virtual machine. This means that Java games do not directly access the hardware at runtime, but through the Java ME virtual machine. The Java ME virtual machine converts Java code into instructions that the device can understand at runtime, and then sends it to the device's processor for execution.

Although Symbian phones are now a thing of the past, Java ME technology still exists and is still widely used on embedded devices. Today, Java ME technology has evolved into the Java Embedded Platform, which remains one of the technologies of choice for mobile devices, smart home and IoT devices. Although the technology of mobile devices has undergone tremendous changes, Java technology still plays an important role in mobile devices, and these devices cannot do without the support of Java virtual machines.

Guess you like

Origin blog.csdn.net/Dark_orange/article/details/131569807