gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-11-01 01:58:55 25 4
gpt4 key购买 nike

我在同一个工作区中有两个项目,在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com