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


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.


Reply
Developer
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

why System.out.println does not work?

hi,

when i'm writing app i would like to test some of the functionalities on the simulator. sometimes i need to print smth to know in which part of program i'm or for some other reasons. i do not want to use alerts!!! so i simply try to use

System.out.println("test"); but it does not work, i mean it does not appear on the output console. it is strange cause when i try it for midlet for s40 it works and text is printed..

 

how can i make it work also for bb simulator?

 

 regards

Developer
Posts: 112
Registered: ‎07-19-2009
My Device: Not Specified

Re: why System.out.println does not work?

Mark a breakpoint on System.out.println and then see what happens..

Developer
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: why System.out.println does not work?

nothing happens.. (i've started using netbeans and maybe i use the debugger wrong). but i remeber when using eclipse System.out.println.. did not also work. does it work for You?

 

 regards

Developer
Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: why System.out.println does not work?

The text you are displaying is very small.

Simulator might be printing but you are not able to see it.

 

Display a long string.

 

System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXPrint");

 

and mark a breakpoint.

 

and then run the application.

It will display 

----------------------------------------------------------
feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.
Developer
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: why System.out.println does not work?

it really does show nothing! i set on this line "toogle line breakpoint" i've set a long text:

 

System.out.println("this is only a testxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");

 

but nothing happens,nothing shows up when i run simulator..

Highlighted
Developer
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: why System.out.println does not work?

Are you getting any other output on the debug console?

 

Have you tried using System.err?

Contributor
Posts: 11
Registered: ‎06-21-2011
My Device: Bold
My Carrier: Smart

Re: why System.out.println does not work?

I have the sample problem. System.out.println is not showing. Please advice

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: why System.out.println does not work?

I have never had this problem on a Simulator.  Recompile and restart your Simulator, put a break point immediately after the System.out.println, and check the debug window.