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
New Developer
henbencau
Posts: 13
Registered: ‎08-26-2009
My Device: Not Specified
Accepted Solution

How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

Hi all, 

I just want to know if there's any solutions to see System.out.println.

I don't use neither Eclipse nor JDE BlackBerry for my developpement.

 

I have my jar, jad files. I convert my jar file by using the rapc tool. The .cod files are generated.

I launch the simulator. Now i have 2 windows : Simulor and Output windows (See the image).

Then I load my .cod files. But i don't  see all System.out.println(" ...") in the output windows.

 

 

 

3251i712D8D14DE295451

 

How i can see these System.out.println("...") ?

Please help me. 

Thanks all.

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

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

hi, YOu can not see the outpput window of the simulator. You need to install jde or eclipse+BB plugin. Regards Ekansh
----------------------------------------------------------
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
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

you can use a selfwritten log or the Logger class for the device event log.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
henbencau
Posts: 13
Registered: ‎08-26-2009
My Device: Not Specified

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

Thanks you for your help. 

But by many specifique problems, i don't want to use neither Eclipse nor JDE for my dev. 

 

Do you know another solution without install these 2 tools.

Thanks

New Developer
henbencau
Posts: 13
Registered: ‎08-26-2009
My Device: Not Specified

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

Thanks for your help. 

I try your solution EventLogger.

But I have another problem: 

 

My application is not a native application (It's a midlet J2ME, not an UIApplication). Do you thinks it will work with EventLogger ?

 

How can I do a register for EventLogger:

 

static boolean register(long guid, String name) 
          Registers the calling application's name and guid.
static boolean register(long guid, String name, int viewerType) 

 

EventLogger.register(0x4c9d3452d87922f2L, "event string ",  EventLogger.VIEWER_STRING);
// String logMessage = "An event has been logged.";
// if (EventLogger.logEvent( 0x4c9d3452d87922f2L, logMessage.getBytes() ) ) {
//   System.out.println("Log Successful!");
// }
//   System.out.println("Log Not Successful!");

 

guid: it's a long that is generated any way i want . The only condition is this guid is unique. For exampe: 0x60ac754bc0867248L.  Is it right ?

 

EventLogger.register(0x60ac754bc0867248L, "NameMyApplication ", EventLogger.VIEWER_STRING);

String logMessage = "This is an event log";

EventLogger.logEvent( 0x60ac754bc0867248L, logMessage.getBytes() );

 

 

Do you think this is correct ?

Thanks.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

looks ok

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
henbencau
Posts: 13
Registered: ‎08-26-2009
My Device: Not Specified

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

Thanks you for your help.

It's beautiful , it works

 

:smileyhappy:

New Developer
henbencau
Posts: 13
Registered: ‎08-26-2009
My Device: Not Specified

Re: How do you see the System.out.println (without use Eclipse and BlackBerry JDE)

Just another the question if possible. 

I saw the event log in the handset (using ALT + LGLG)

 

But in the "Event Log" windows of Simulator , why didn't I find these Log Event ?

 

(See the photo)

 

3254i4C82A575A616B6DF

 

Thanks for your help.