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
Developer
redpath
Posts: 62
Registered: ‎07-29-2008

JVM 104 Simulator

I build my COD file and it works fine on the REAL device.

 

I did some testing on the emulator 8130 which uses the MDS and get a JVM 104 nullpointer and then continue

and it works fine. The build process I use is to take a JAR file

preverify it and the rapc to a COD and sign. Seems kinda normal. 

 

C:\blackBerryJDE4.3.0\bin\preverify -d C:\BuildMidlet -classpath "C:\BlackBerryJDE4.3.0\lib\net_rim_api.jar"  myMidlet.jar
C:\BlackBerryJDE4.3.0\bin\rapc import="C:\BlackBerryJDE4.3.0\lib\net_rim_api.jar" codename=myMidlet -midlet jad=myMidlet.jad myMidlet.jar
cd \BlackBerryJDE4.3.0
cd bin
java -jar SignatureTool.jar -a c:\Build_Midlet\myMidlet.cod
 

Should I be concerned with this. I use java to create the JAR as it takes *.java nicely and thenuse JAR

to create the jar. No big deal.

 

 

Please use plain text.
Developer
redpath
Posts: 62
Registered: ‎07-29-2008

Re: JVM 104 Simulator

I simply reset the emulator and it worked fine no JVM 104.

I tried to use the rapc directly to compile and build but it produces

a COD file that simply traps as the rapc is quite undocumented.

 

This is not a good result below, the previous result is very good and I will stick with it.

 

C:\BlackBerryJDE4.3.0\bin\rapc import="C:\BlackBerryJDE4.3.0\lib\net_rim_api.jar" codename=myMidlet -midlet jad=myMidlet.jad @list.txt
cd \BlackBerryJDE4.3.0
cd bin
java -jar SignatureTool.jar -C -a c:\Build_my_Midlet\myMidlet.cod
cd \Build_my_Midlet
dir myMidlet.cod
 

Please use plain text.
Developer
kzettel
Posts: 120
Registered: ‎07-16-2008

Re: JVM 104 Simulator

You may still have a NullPointerException on the real device, it just behaves differently than the simulator. The simulator displays the NullPointerException as an error screen but the actual device will hide the error from the user so it could be happening in both. To see if the same error is happening on the device you can view the device's event log.  If there is an uncaught NPE it will show up as a bold entry in the log.  To do this press Alt-LGLG on the main ribbon.  This will show the stack trace which will tell you which module and method is causing the error.  If it is not there then you are problably correct and the error is only on the simulator.

 

To diagnose where the NullPointerException on the simulator, launch the simulator from the jde in debug mode or attach your IDE to it with the remote debugger and it will break on the line of code that is causing the uncaught exception. 

 

As far as the build process using java to create a jar, preverifying the jar and running rapc against your preverified jar to create your BlackBerry application is what many people who want an automated build are doing.

Kurt Zettel | Chief Architect | Metova
www.metova.com
Please use plain text.