Development of Java programs of different versions

Source: Internet
Author: User

 

Different Java Versions differ in the integrity of their supported core category Library and the supported Java basic types, that is, whether you are developing a Java program used by the enterprise, a Java program executed on an embedded device, an applet executed on a browser, or an application executed on a PC. You must first install j2se on your computer, and then install the core category library and additional extended category library of various versions, in this way, Java programs for different purposes can be developed successfully. Java compilers (javac.exe) provided by j2se can help us compile Java programs on different platforms, while Java virtual machines (java.exe) provided by j2se can) in this way, we can test whether the execution results of these programs are correct on the PC. In addition, the Java compiler does not help you check whether your program meets the core category library and Java basic types supported on various platforms. For example, although we have mentioned earlier that the smart card version does not support Java basic types other than Boolean and byte, and the platform only supports Java. lang. * core category, but when writing a program on the smart card platform, even if the program code contains a Java basic type other than Boolean OR byte, or Java. lang. * For other core categories, the compiler can still help you compile the category files as usual. At this time, you must start to get confused-if these programs are put on the smart card header for execution, what if there is a problem? Won't it cause an error when executing the virtual machine on the smart card? In view of this potential problem, Some of Sun Microsystems's Development kits of different versions will include the checker or preverifier ), these two tools can help you check and pre-review programs before they are placed on the target platform. The checker will help you find out the parts that do not match the Target Platform specification in the category file and remind you that these parts may not be executed on the target platform. Therefore, with the assistance of the scanner, you can determine that your program can comply with the requirements of the target platform and be executed smoothly. The Java card development kit contains a checker.

 

The Development kits of some platforms are attached with the pre-review tool. In addition to the work done by the pre-audit tool, there is also an additional task to reduce the burden on virtual machines on the target platform, it is necessary to explain the additional work of the pre-reviewer. In traditional Java programs, for security considerations, any category that enters the execution environment (whether from the local machine or remote machine) must be verified by the byte code reviewer (byte code verifier, in order to prevent the program from being maliciously modified during transmission, so that the Java program has a negative impact on the system during execution. After review, this category file can be executed by the Java VM. If the review is executed on a general PC, the speed is acceptable, however, once placed on a machine such as palm or mobile phone with slow CPU and less memory, it seems very difficult. To save valuable CPU computing time (saving power and accelerating program execution), before programmers generate category files that can be executed on certain platforms, the programmer must first use the pre-reviewer on the PC for some pre-review work. The pre-reviewer will add some special marks or symbols to the category file. As a result, when these programs are executed on the target platform, the time for review on the target platform can be greatly reduced, and the process starts and executes can be accelerated. Therefore, the execution steps of Programs (spotlet and MIDlet) under j2's become less work for the byte code reviewer during execution because of the pre-audit relationship, therefore, the time between program loading and execution is shortened. The standard cldc instance and MIDP reference instance are attached with a pre-reviewer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.