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

by BlackBerry Development Advisor on ‎06-09-2010 03:48 PM - edited on ‎09-20-2010 04:56 PM by BlackBerry Development Advisor (6,273 Views)

BlackBerry® Java® Development Environment (BlackBerry JDE) uses the rapc.exe tool to compile and package .cod files. Before packaging an application in to a .cod file, rapc.exe uses javac.exe from the installed Java® Development Kit (JDK) to generate the .class files. Rapc.exe automatically ensures that these .class files are targeted for BlackBerry® Java® Virtual Machine (BlackBerry JVM) 1.1 or later. This is done to maintain compatibility on the BlackBerry smartphones when the .class files are actually packaged in a .cod file.

 

If you are using a custom script that calls javac.exe and rapc.exe separately to package your application, you will have to make sure that you are calling javac.exe with -target option so that all generated .class files are compatible. This is a requirement to make sure that the generated .class files are consistent with Connected Limited Device configuration (CLDC) 1.1 BlackBerry JVM implementation.

Comments
by Developer on ‎06-17-2010 07:57 AM

Just wondered why you would want to do this?

by Administrator on ‎06-17-2010 09:33 AM

It's more a matter that you have to.  Newer target versions (such as those that support things like generics) are not supported in the J2ME world, nor are they supported by the BlackBerry rapc compiler.