Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
08-24-2011 05:54 PM
I have a library that was complied for BlackBerry JRE. The task is to extract all the methods and their parameters and types.I would like to use it to automate my code creation process.
There is a solution using with the java.util.reflection. It will not work on BB JRE for the known JavaME descendance.
Can I do the same thing in Eclipse or any other way, may be preprocessor? I would like to have a list of methods and parameters from a jar file. Can this be done outside the compilation process?
I other words, do I need the BB JRE to get access to that library complied for BB? Can I use it with a JavaCE JRE/JDK?
08-25-2011 04:51 PM
08-25-2011 05:16 PM
HI rcmaniac25 !
Thanks for your time. Well, I do not know how the jar was compiled. It came as a single jar. Even if it is compiled for BB with a COD, somehow Eclipse can show its' methods and parameters in the project explorer view. What does it use then? Can it be I do not need the reflection?
Here is the library just in case https://www.x.com/servlet/JiveServlet/downloadBody
08-26-2011 11:04 AM
Ok, I checked the JAR you linked, you could do reflection with it as long as the reflection isn't expected to run on BlackBerry (BlackBerry doesn't have reflection capabilities right now, but you said you wanted to do reflection outside of the project).
The general explanation for why you can see the classes, methods, etc. is that it's a normal JAR file (just compiled under J2ME constraints, which means it will work on BlackBerry).
Compiling for BlackBerry
JAR (normal java program/library) -> RAPC -> JAR and COD.
The JAR file that RAPC produces will look like a normal java program/library, but if you try to run it, it will not work. The COD file, well that's self explanatory, it won't work on anything bug a BlackBerry.
That is why I specified if it's a JAR file that was compiled with a COD file. It is there so that you can link to it with Eclipse/JRE and use the classes/functions/etc.