Preverifying Class Error - Java / Eclipse / Blackberry

I have two projects in one workspace, using the same workspace with Eclipse.

Project1 - Links Project No. 2, and also contains the "Java Build Path" for Project 2
Project2 - nothing refers

Project1 package is called Project1
Project2 pacakge called Proejct2

I am importing Projec2 into Project1 using:

import Project2.ClassName 

When compiling, I get an error message:

 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 

Any suggestions would be awesome

+4
source share
4 answers

Perhaps because the preliminary verification step was not performed correctly in the net.rim.eide library used.
This thread actually offers to pre-analyze the library , even in order to make a preliminary process for each class (as done here )!


Note: preverification :

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

Conversion performs certain checks on Java bytecodes before runtime .
If this first test pass is approved, the converter annotates the class files (using the standard Java bytecode attributes, so these are still plain old Java bytecodes and will run in virtual machines without knowing the benefits of pre-validation), and then save annotated class files or passes them along with the next tool in the compilation chain.

When KVM attempts to run CLDC-based J2ME application, it validates Java class files for these pre-validation annotations. Native annotations in class files ensure that certain compile-time checks have been performed, and therefore KVM can go through its own checks and security checks much faster and faster to run the application.

The consolidated implementation of the Sun CLDC SDK includes the "preverify" tool. You use the tool after compiling the code through javac (or your favorite Java compiler).

+3
source

I got this error when I used the default compiler settings of Java 6. Try setting them to 1.3 by going to "Properties> Java Compiler" and using these settings.

+3
source

Before you try to delete anything bin folder and recompile. An error can occur when building a project using one JRE system library, and then changing it to another.

+1
source

To compile correctly, right-click Project1 and go to "Properties> Java Build Path> Projects". Add Project2 as a dependency and you can compile it correctly.

0
source

All Articles