What does preverification of J2ME application mean?
I read the following:
J2ME applications, unlike normal Java applications are preverified.
What exactly does the prev开发者_如何学Pythonerification of J2ME jar file mean? Is it something like checksum?
From here:
Answer Preverification is a new phase in the development and deployment cycle for Java applications designed to run on the J2ME CLDC. Preverification performs certain checks on the Java bytecodes ahead of runtime. If this first verification pass is ok, the preverifier annotates the classfiles (using standard Java bytecode "attributes", so that these are still plain old Java bytecodes and will be executable in VMs not aware of the benefits of preverification), and then saves the annotated class files or passes them along to the next tool in the compile chain.
When the KVM attempts to run execute a J2ME CLDC-based application, it checks the Java class files for these preverification annotations. Proper annotations in the class files guarantee that certain compile-time checks were made, and so the KVM can pass through its own verfication and security checks much faster and start executing the application more quickly.
Sun's CLDC reference implementation SDK includes the 'preverify' tool. You use the tool after compiling your code via javac (or your favorite Java compiler). More information on preverify is included in the CLDC specification and in the developer docs included with the CLDC SDK.
Preverification performs certain checks on the Java bytecodes ahead of runtime. If this first verification pass is ok, the preverifier annotates the classfiles (using standard Java bytecode "attributes", so that these are still plain old Java bytecodes and will be executable in VMs not aware of the benefits of preverification), and then saves the annotated class files or passes them along to the next tool in the compile chain.
精彩评论