java - 错误预验证类 - Java/Eclipse/Blackberry

标签 java eclipse blackberry

我在同一个工作区中有两个项目,在 Eclipse 中使用一个工作区。

项目 1 - 引用项目 #2 并且还包含项目 2 的“Java 构建路径”
项目 2 - 不引用任何内容

Project1 包称为 Project1
Project2 包称为 Proejct2

我使用以下方法将 Projec2 导入到 Project1 中:

import Project2.ClassName 

编译时出现错误:

Error preverifying class Project1.Launcher    Project1 line 0    BlackBerry Java Problem
Error!: Error: preverifier failed: C:\Users\footose\Desktop\eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\bin\prev ...    Project1        line 0    BlackBerry Java Problem 

任何建议都会很棒

最佳答案

这可能是因为您使用的net.rim.eide库中的预验证步骤没有正确完成。
该线程实际上建议 preverify the library independently ,甚至为每个类做预验证过程(如 here 所做的)!


注:preverification是:

a phase in the development and deployment cycle for Java applications designed to run on the J2ME CLDC (Connected Limited Device Configuration).

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).

关于java - 错误预验证类 - Java/Eclipse/Blackberry,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1161078/

相关文章:

android - 用于移动和 Web 应用程序的服务器

apache - 黑莓阅读 mod_deflate 压缩页面

android - M2E 不适用于现有的 Maven 项目

eclipse - Eclipse 中控制台输出的过滤

eclipse - 如何根据产品配置和目标平台定义构建RCP应用程序?

Java仅通过一个对象发送类参数

image - 如何在黑莓中裁剪具有特定形状的图像?

java - 使用 DOM/batik 进行事件点击 : Recovery the use tag which refers a symbol

java - 从 Java 调用 Python 脚本。我应该使用 Docker 吗?

java - 如何在 Java 应用程序的底部创建一个栏,例如状态栏?