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
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810
Accepted Solution

How to see java code of public API (Font in particular)

Hi

 

Excuse my noobishness,  but I recently encountered {this} post and cannot seem to find out how did Mantaker (and other discussion participants) discover the java code of the Font class ?

 

Am I missing something? Can this be done for any public class ?

 

Please fill in my knowledge blanks.

 

Thank you.



"Listen carefully, I shall say this only once"
Developer
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: How to see java code of public API (Font in particular)

Likely a decompiler, which isn't strictly legal. Some developers decompile libraries to check for hidden constants or to understand why a method works the way it does. It has merit, but it also leads to copyright infringement, which I've heard is a bad thing.

 

Hope that helps,

~Dom

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
Developer
Posts: 77
Registered: ‎01-27-2010
My Device: Bold 9000
My Carrier: AT&T

Re: How to see java code of public API (Font in particular)

[ Edited ]

If you'll look at the post right above the one you linked to you'll see that they used the javap command.  It's legal and it comes with the JDK.  By the way you'll notice it doesn't give the full code just the method headers and fields.

 

So for instance to get the information they did go to the command line and navigate to the directory where your net_rim_api.jar file is.  Then type 

 

javap net.rim.device.api.ui.Font

 

This of course assumes that the javap command is in your path.  

 

Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to see java code of public API (Font in particular)

you live and learn....

 

Thanks !



"Listen carefully, I shall say this only once"