Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 4
Registered: ‎09-28-2008
My Device: Not Specified

Build failed under JDE4.0

Hi all,

    I have blocked by a problem.

    My project is OK when build under JDE 4.2/4.3/4.5.  But when I build this project under JDE 4.0, I'll get the error message: "Error loading class resource.Cd£".   Here Cd is the resource name of my porject. I don't know where is the symbol "£" from.

    And I've set the path enviroment correct to JDK v1.4.

    Anyone could help me? Thanks!

 

Ben

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Build failed under JDE4.0

I don't use the IDE but I routinely build under 4.0.2 from the command line and am interested in resource problems

as I had a hard time with this ( and eventually gave up as I have alternative ways to localize text and graphics).

 

However, I would ask if you could copy the results from the bottom right box in the ide, the build log, so we could

look at what the IDE is trying to do. This may or may not help your immediate problem but it may let

us see what is being given to the build tools.

 

Thanks.

New Developer
Posts: 4
Registered: ‎09-28-2008
My Device: Not Specified

Re: Build failed under JDE4.0

Below is the message I got from JDE builder:

 

Deleting D:\project\calcdate\Date Master.cod.
Building calcdate ...
C:\Program Files\Research In Motion\BlackBerry JDE 4.0\bin\rapc.exe  -quiet import="C:\Program Files\Research In Motion\BlackBerry JDE 4.0\lib\net_rim_api.jar" codename="Date Master" "Date Master.rapc" D:\project\calcdate\calcdate\calcdate.java D:\project\calcdate\calcdate\CalendarField.java D:\project\calcdate\calcdate\CalendarHeaderManager.java D:\project\calcdate\calcdate\CDate.java D:\project\calcdate\calcdate\CHoliday.java D:\project\calcdate\calcdate\CPrivateDay.java D:\project\calcdate\calcdate\CPrivateDayRecord.java D:\project\calcdate\calcdate\CReg.java D:\project\calcdate\calcdate\HolidayScreen.java D:\project\calcdate\calcdate\MyCalendarField.java D:\project\calcdate\calcdate\OperationScreen.java D:\project\calcdate\calcdate\PrivateDayScreen.java D:\project\calcdate\calcdate\RegScreen.java D:\project\calcdate\calcdate\SwitchAppMenuItem.java D:\project\calcdate\calcdate\TitleManager.java D:\project\calcdate\calcdate\TypeChoice.java D:\project\calcdate\img\calcdate.png D:\project\calcdate\img\wait.png D:\project\calcdate\resource\Cd.rrc D:\project\calcdate\resource\Cd.rrh
Error loading class resource.Cd£
Error!: Error: preverifier failed: C:\Program Files\Research In Motion\BlackBerry JDE 4.0\bin\preverify.exe -d C:\DOCUME~1\hlh\LOCALS~1\ ...
Error while building project

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Build failed under JDE4.0

As I recall, the compiler generates some resource files. I guess if it is trying to load a generated file from your

prior later-version build that would cause this kind of error.

 

Did you try to clean from the IDE and go through the project and manually remove temp files from the

old builds?

 

 

Thanks.

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Build failed under JDE4.0

[ Edited ]

I had similar issues taking a project from 4.2 down to 4.0.

 

Here are some things that I found:

 

1. You must edit the IDE.bat file (in the 4.0 JDE bin directory) to point to the correct JDK. 4.0 uses (if I remember correctly) 1.4, and is not compatible with 1.5 or 1.6 (which is required when you move up to 4.2 and beyond). There is a white paper on this in the knowledge base here:

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Confi...

 

2. Clean all compiler artifacts from your build directory (all of the compiler-generated files).

 

3. Delete your workspace and project files and re-create them again from the 4.0 IDE.

 

 

 

 

 

Message Edited by RexDoug on 09-28-2008 09:33 AM
Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Build failed under JDE4.0

I don't use any of the IDE project stuff but AFAIK, I get multiple builds

from 4.0.2 to 4.3.0 with no modification to the jre/jdk variables ( although I could have forgotten something).

In fact, AFAIK, to install multiple versions of build tools, you just need to copy the bin/jar/dll files and don't need any

additional install steps. There can be compatibility issues with java ( as I noted that your api jar file SHOULD

at least load, if not be forced to run with emulator native support,  on my desktop as well as the phone )

but I haven't found any yet. AFAIK, I am just changing a RIM path nothing related to Sun tools,

 where BASEC invokes my script that doesn't know where anything is,

 

CMD="${BASEC} ${LTGT}? -jde_dir ${CYDEV}/JDE4.0/bin  "
# you get the idea... this really needs to be broken up a bit
CMD402="${BASEC} ${LTGT}? -jde_dir ${CYDEV}/JDE4.0.2/bin  "
CMD42="${BASEC} ${LTGT}? -jde_dir ${CYDEV}/RIMM_JDE/bin " 

 

 

I would point out again the difference in cost/benefit from information versus graphics. The tools themselves

are quite flexible and compatible, the problems occur with things like IDE's and global paths that

can't be set without stepping on each other. Also, instead of posting a build log the OP could have

taken a screen shot and posted a 16M picture that would be of little likely benefit.

 

 

BlackBerry Development Advisor
Posts: 15,752
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Build failed under JDE4.0

The format of resource files was changed between these two versions.  If you need to downgrade to BlackBerry JDE 4.0, you may need to recreate your resource files.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 4
Registered: ‎09-28-2008
My Device: Not Specified

Re: Build failed under JDE4.0

Thank Mark Sohm.

I recreate the rrh and rrc file under JDE4.0 as the IDE's online help, but my problem still exists.

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Build failed under JDE4.0

The preverifier operates on class files. Do you have an old copy of the resource class files somewhere the compiler

can find it? Compilers pickup classes as well as java for "linking"

 

New Developer
Posts: 4
Registered: ‎09-28-2008
My Device: Not Specified

Re: Build failed under JDE4.0

[ Edited ]
I newed a very simple helloworld project under JDE4.0, and all code and resouce file were copied from the samples of JDE4.0.
But I still get the error message as following:

Deleting D:\project\helloworld\helloworld.cod.
Building helloworld ...
C:\Program Files\Research In Motion\BlackBerry JDE 4.0\bin\rapc.exe -quiet import="C:\Program Files\Research In Motion\BlackBerry JDE 4.0\lib\net_rim_api.jar" codename=helloworld helloworld.rapc D:\project\helloworld\HelloWorld.java D:\project\helloworld\img\helloworld_jde.png D:\project\helloworld\img\helloworld_jde_bw.gif D:\project\helloworld\resource\HelloWorldRes.rrc D:\project\helloworld\resource\HelloWorldRes.rrh D:\project\helloworld\resource\HelloWorldRes_de.rrc D:\project\helloworld\resource\HelloWorldRes_en.rrc D:\project\helloworld\resource\HelloWorldRes_es.rrc D:\project\helloworld\resource\HelloWorldRes_fr.rrc D:\project\helloworld\resource\HelloWorldRes_it.rrc
Error loading class resource.HelloWorldRes£
Error loading class resource.HelloWorldRes£de
Error loading class resource.HelloWorldRes£en
Error loading class resource.HelloWorldRes£es
Error loading class resource.HelloWorldRes£fr
Error loading class resource.HelloWorldRes£it
Error!: Error: preverifier failed: C:\Program Files\Research In Motion\BlackBerry JDE 4.0\bin\preverify.exe -d C:\DOCUME~1\hlh\LOCALS~1\ ...
Error while building project


I don't know how to add attachment in my post.
Anyone has the JDE4.0 enviroment? Would you please help me to build my helloworld project in your eviroment to check whether it works? I'll send my project through email to you.
I think maybe it was caused by my WinXP's language, because my WinXP system isn't English.
Message Edited by yueren on 10-05-2008 10:55 AM