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
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Iam new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

@ankur_siwach - The Java code posted here is pretty much a copy of the KB article.

 

@OP - it seems that you are running your code and not getting the output you expect.  Simon has suggested putting debugging statements in that will help you track the progress of your application using debug output to the console.  The other alternative is to use runtime debugging so you track the progress through your code as it runs.  I suggest you try this   Hopefully the following link will tell you how to do achieve this:

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-Debug-and-Optimize/ta-p/442791

 

 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Iam new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

This is the debugging out when I clicked debug as BalackBerry Simulator

 

 

 

o debug information found for 'net_rim_bis_client__en' (4f3c2674).
No debug information found for 'net_rim_bis_client__en-1' (4f3c2674).
No debug information found for 'net_rim_bis_client__en-2' (4f3c2674).
No debug information found for 'net_rim_bis_client__en-3' (4f3c2674).
No debug information found for 'net_rim_bis_client__en-4' (4f3c2674).
No debug information found for 'net_rim_bis_client__ko' (4f3c2701).
No debug information found for 'net_rim_bis_client__ko-1' (4f3c2701).
No debug information found for 'net_rim_bis_client__ko-2' (4f3c2701).
No debug information found for 'net_rim_bis_client__zh_TW' (4f3c2797).
No debug information found for 'net_rim_bis_client__zh_TW-1' (4f3c2797).
No debug information found for 'net_rim_bis_client__zh_TW-2' (4f3c2797).
No debug information found for 'net_rim_bis_client__id' (4f3c26df).
No debug information found for 'net_rim_bis_client__id-1' (4f3c26df).
No debug information found for 'net_rim_bis_client__id-2' (4f3c26df).
No debug information found for 'net_rim_bis_client__zh_CN' (4f3c278a).
No debug information found for 'net_rim_bis_client__zh_CN-1' (4f3c278a).
No debug information found for 'net_rim_bis_client__zh_CN-2' (4f3c278a).
No debug information found for 'net_rim_bis_client__pt_BR' (4f3c273a).
No debug information found for 'net_rim_bis_client__pt_BR-1' (4f3c273a).
No debug information found for 'net_rim_bis_client__pt_BR-2' (4f3c273a).
No debug information found for 'net_rim_bis_client__en_GB' (4f3c2680).
No debug information found for 'net_rim_bis_client__en_GB-1' (4f3c2680).
No debug information found for 'net_rim_bis_client__en_GB-2' (4f3c2680).
No debug information found for 'net_rim_bis_client__fr' (4f3c26a0).
No debug information found for 'net_rim_bis_client__fr-1' (4f3c26a0).
No debug information found for 'net_rim_bis_client__fr-2' (4f3c26a0).
No debug information found for 'net_rim_bis_client__th' (4f3c2768).
No debug information found for 'net_rim_bis_client__th-1' (4f3c2768).
No debug information found for 'net_rim_bis_client__th-2' (4f3c2768).
No debug information found for 'net_rim_bis_client__es' (4f3c268b).
No debug information found for 'net_rim_bis_client__es-1' (4f3c268b).
No debug information found for 'net_rim_bis_client__es-2' (4f3c268b).
No debug information found for 'net_rim_bis_client__pt' (4f3c272e).
No debug information found for 'net_rim_bis_client__pt-1' (4f3c272e).
No debug information found for 'net_rim_bis_client__pt-2' (4f3c272e).
No debug information found for 'SecurIDLib' (456c5107).
No debug information found for 'net_rim_bis_client_resources' (4f3c27a7).
No debug information found for 'net_rim_bis_client_res' (4f3c27a2).
[7918.132] JVM: bklt[1] @7918132: JvmBacklightEnableFor 30 ()
[7918.132] JVM: bklt[1]: setTimeout 30
[7918.132] VM:-DA 0
[7918.171] LCD[0] type: 00004009
[7918.171] WM Display [0] width: 00000280
[7918.171] WM Display [0] height: 000001e0
[7918.171] THRTL: Out: 0 bytes
[7918.171] THRTL: In: 0 bytes
[7926.015] VM:IGCSc=0
[7926.015] VM:+GC(f)w=9
[7926.132] VM:-GCt=15,b=1,r=0,g=f,w=9,m=0
[7926.132] VM:+CR
[7926.25] VM:-CR t=15
[7934.007] VM:IGCSc=4
[7934.007] VM:+GC(f)w=10
[7934.078] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[7934.085] VM:QUOT t=1
[7934.085] VM:+CR
[7934.085] VM:-CR t=0
[7934.085] THRTL: Out: 0 bytes
[7934.085] THRTL: In: 0 bytes
[7994.007] VM:IGCSc=4
[7994.007] VM:+GC(f)w=10
[7994.07] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[7994.085] VM:QUOT t=2
[7994.085] VM:+CR
[7994.085] VM:-CR t=0
[7994.085] THRTL: Out: 0 bytes
[7994.093] SmplT: stTue Sep 17 09:33:00 GMT 2013
[7994.093] THRTL: In: 0 bytes
[8044.976] VM:IGCSc=0
[8044.984] VM:+GC(f)w=10
[8045.054] VM:-GCt=10,b=1,r=0,g=f,w=10,m=0
[8045.054] VM:+CR
[8045.062] VM:-CR t=1
[8053.968] VM:IGCSc=4
[8053.968] VM:+GC(f)w=10
[8054.039] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8054.046] VM:QUOT t=1
[8054.046] VM:+CR
[8054.046] VM:-CR t=0
[8054.046] THRTL: Out: 0 bytes
[8054.046] THRTL: In: 0 bytes
[8100.703] FocusHistory: Focus lost; App ParseXML; Component mypackage.MyScreen
[8100.71] VM:RTMSh=74,o=0x10A0FC00,p=ParseXML
[8100.71] VM:smileyvery-happy:PRMv=1
[8100.71] AM: Exit ParseXML(326)
[8100.71] AM: Foreground is requested: net_rim_bb_ribbon_app(143)
[8100.71] VM:EVTOv=7680,w=20
[8100.71] AM: Foreground is set: net_rim_bb_ribbon_app(143)
[8100.718] FocusHistory: Focus gained; App net_rim_bb_ribbon_app; Component net.rim.device.apps.internal.ribbon[8100.718] .launcher.ApplicationAreaGridField
[8100.75] Process ParseXML(326) cleanup started
[8100.75] Process ParseXML(326) cleanup done
[8100.781] VM:NCICv=32,w=2
[8100.976] 09/17 09:34:47.355 BBM FutureTask Execute: net.rim.device.apps.internal.qm.bbm.platform.BBMPlatformM[8100.976] anagerImpl$3@c6e7cf2b
[8101.078] BRM:IDL+
[8101.078] BRM:smileyfrustrated:R+
[8101.078] BRM:NMC:2703360
[8101.078] BRM:JFR:17982648
[8101.078] BRM:smileyfrustrated:R-
[8101.078] BRM:NMC:2703360
[8101.078] BRM:JFR:17982648
[8101.078] BRM:IDL-
[8101.078] 09/17 09:34:47.466 BBM FutureTask Finish : net.rim.device.apps.internal.qm.bbm.platform.BBMPlatformM[8101.078] anagerImpl$3@c6e7cf2b
[8113.992] THRTL: Out: 0 bytes
[8113.992] SmplT: stTue Sep 17 09:35:00 GMT 2013
[8114.0] THRTL: In: 0 bytes
[8121.945] VM:smileytongue:OSPs=net_rim_services_impl
[8121.945] VM:IGCSc=0
[8121.945] VM:+GC(f)w=10
[8122.007] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8122.007] VM:+CR
[8122.007] VM:-CR t=0
[8122.007] JVM:smileytongue:ost Sleepless 11 3 424507
[8129.921] VM:IGCSc=0
[8129.921] VM:+GC(f)w=10
[8129.992] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8129.992] VM:+CR
[8130.0] VM:-CR t=1
[8173.921] VM:IGCSc=4
[8173.921] VM:+GC(f)w=10
[8173.992] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8174.0] VM:QUOT t=1
[8174.0] VM:+CR
[8174.0] VM:-CR t=0
[8174.046] THRTL: Out: 0 bytes
[8174.046] THRTL: In: 0 bytes
[8181.921] VM:IGCSc=0
[8181.921] VM:+GC(f)w=10
[8181.992] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8182.0] VM:QUOT t=1
[8182.0] VM:+CR
[8182.0] VM:-CR t=0
[8217.945] VM:smileytongue:ISVt=0,h=5314,id=d15a33128dfbb5d9
[8217.945] VM:LNTDa=commit,t=0,p=net_rim_sync_daemon,h=150
[8218.0] VM:smileytongue:ISVt=0,h=5314,id=d15a33128dfbb5d9
[8218.015] VM:CMPOv=2
[8218.015] VM:LNTDa=commit,t=2,p=net_rim_sync_daemon,h=150
[8218.046] VM:LNTDa=commit,t=0,p=net_rim_sync_daemon,h=150
[8225.921] VM:IGCSc=0
[8225.921] VM:+GC(f)w=10
[8225.984] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8225.984] VM:+CR
[8225.984] VM:-CR t=0
[8233.914] VM:IGCSc=4
[8233.914] VM:+GC(f)w=10
[8233.976] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8233.976] VM:+CR
[8233.976] VM:-CR t=0
[8234.023] THRTL: Out: 0 bytes
[8234.023] THRTL: In: 0 bytes
[8234.023] SmplT: stTue Sep 17 09:37:00 GMT 2013
[8241.906] VM:IGCSc=0
[8241.906] VM:+GC(f)w=10
[8241.984] VM:-GCt=10,b=1,r=0,g=f,w=10,m=0
[8241.984] VM:+CR
[8241.984] VM:-CR t=0
[8293.898] VM:IGCSc=4
[8293.898] VM:+GC(f)w=10
[8293.968] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8293.968] VM:+CR
[8293.976] VM:-CR t=1
[8294.015] THRTL: Out: 0 bytes
[8294.015] THRTL: In: 0 bytes
[8301.898] VM:IGCSc=0
[8301.898] VM:+GC(f)w=10
[8301.968] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8301.968] VM:+CR
[8301.968] VM:-CR t=0
[8353.89] VM:IGCSc=4
[8353.89] VM:+GC(f)w=10
[8353.96] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8353.96] VM:+CR
[8353.96] VM:-CR t=0
[8354.0] THRTL: Out: 0 bytes
[8354.0] THRTL: In: 0 bytes
[8354.0] SmplT: stTue Sep 17 09:39:00 GMT 2013
[8361.882] VM:IGCSc=0
[8361.882] VM:+GC(f)w=10
[8361.96] VM:-GCt=10,b=1,r=0,g=f,w=10,m=0
[8361.96] VM:+CR
[8361.968] VM:-CR t=1
[8408.882] VM:IGCSc=0
[8408.882] VM:+GC(f)w=10
[8408.945] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8408.953] VM:QUOT t=1
[8408.953] VM:+CR
[8408.953] VM:-CR t=0
[8413.882] VM:IGCSc=4
[8413.882] VM:+GC(f)w=10
[8413.945] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8413.945] VM:+CR
[8413.945] VM:-CR t=0
[8413.992] THRTL: Out: 0 bytes
[8413.992] THRTL: In: 0 bytes
[8413.992] BRM:IDL+
[8413.992] BRM:smileyfrustrated:R+
[8413.992] BRM:NMC:2703360
[8413.992] BRM:JFR:17982164
[8414.101] BRM:smileyfrustrated:R-
[8414.101] BRM:NMC:241664
[8414.101] BRM:JFR:15369108
[8414.101] BRM:IDL-
[8473.867] VM:IGCSc=4
[8473.867] VM:+GC(f)w=9
[8473.937] VM:-GCt=9,b=1,r=0,g=f,w=9,m=0
[8473.937] VM:+CR
[8473.937] VM:-CR t=0
[8473.976] THRTL: Out: 0 bytes
[8473.976] THRTL: In: 0 bytes
[8473.976] SmplT: stTue Sep 17 09:41:00 GMT 2013
[8481.851] VM:IGCSc=0
[8481.851] VM:+GC(f)w=10
[8481.929] VM:-GCt=10,b=1,r=0,g=f,w=10,m=0
[8481.929] VM:+CR
[8481.929] VM:-CR t=0
[8525.843] VM:IGCSc=0
[8525.843] VM:+GC(f)w=10
[8525.906] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8525.914] VM:QUOT t=1
[8525.914] VM:+CR
[8525.914] VM:-CR t=0
[8533.843] VM:IGCSc=4
[8533.843] VM:+GC(f)w=10
[8533.906] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8533.906] VM:+CR
[8533.914] VM:-CR t=1
[8533.953] THRTL: Out: 0 bytes
[8533.953] THRTL: In: 0 bytes
[8541.843] VM:IGCSc=0
[8541.843] VM:+GC(f)w=10
[8541.914] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8541.914] VM:+CR
[8541.914] VM:-CR t=0
[8593.828] VM:smileytongue:OSPs=net_rim_sync_daemon
[8593.828] VM:IGCSc=4
[8593.828] VM:+GC(f)w=10
[8593.898] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8593.906] VM:QUOT t=1
[8593.906] VM:+CR
[8593.906] VM:-CR t=0
[8593.945] THRTL: Out: 0 bytes
[8593.945] THRTL: In: 0 bytes
[8593.945] SmplT: stTue Sep 17 09:43:00 GMT 2013
[8593.945] JVM:smileytongue:ost Sleepless 21 2 471882
[8601.796] VM:IGCSc=0
[8601.796] VM:+GC(f)w=10
[8601.875] VM:-GCt=10,b=1,r=0,g=f,w=10,m=0
[8601.875] VM:+CR
[8601.882] VM:-CR t=1
[8616.796] VM:IGCSc=0
[8616.796] VM:+GC(f)w=10
[8616.867] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8616.875] VM:QUOT t=1
[8616.875] VM:+CR
[8616.875] VM:-CR t=0
[8653.796] VM:IGCSc=4
[8653.796] VM:+GC(f)w=10
[8653.851] VM:-GCt=7,b=1,r=0,g=f,w=10,m=0
[8653.859] VM:QUOT t=1
[8653.859] VM:+CR
[8653.859] VM:-CR t=0
[8653.906] THRTL: Out: 0 bytes
[8653.906] THRTL: In: 0 bytes
[8661.789] VM:IGCSc=0
[8661.789] VM:+GC(f)w=10
[8661.859] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8661.859] VM:+CR
[8661.859] VM:-CR t=0
[8713.781] VM:IGCSc=4
[8713.781] VM:+GC(f)w=10
[8713.851] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8713.851] VM:+CR
[8713.851] VM:-CR t=0
[8713.89] THRTL: Out: 0 bytes
[8713.89] THRTL: In: 0 bytes
[8713.89] SmplT: stTue Sep 17 09:45:00 GMT 2013
[8721.773] VM:IGCSc=0
[8721.773] VM:+GC(f)w=10
[8721.843] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8721.843] VM:+CR
[8721.843] VM:-CR t=0
[8773.773] VM:IGCSc=4
[8773.773] VM:+GC(f)w=10
[8773.843] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8773.843] VM:+CR
[8773.843] VM:-CR t=0
[8773.882] THRTL: Out: 0 bytes
[8773.882] THRTL: In: 0 bytes
[8781.765] VM:IGCSc=0
[8781.765] VM:+GC(f)w=10
[8781.835] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8781.843] VM:QUOT t=1
[8781.843] VM:+CR
[8781.843] VM:-CR t=0
[8833.765] VM:IGCSc=4
[8833.765] VM:+GC(f)w=10
[8833.828] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8833.835] VM:QUOT t=1
[8833.835] VM:+CR
[8833.835] VM:-CR t=0
[8833.875] THRTL: Out: 0 bytes
[8833.875] THRTL: In: 0 bytes
[8833.875] SmplT: stTue Sep 17 09:47:00 GMT 2013
[8841.75] VM:IGCSc=0
[8841.75] VM:+GC(f)w=10
[8841.82] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8841.82] VM:+CR
[8841.82] VM:-CR t=0
[8893.742] VM:IGCSc=4
[8893.742] VM:+GC(f)w=10
[8893.804] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8893.812] VM:QUOT t=1
[8893.812] VM:+CR
[8893.812] VM:-CR t=0
[8893.851] THRTL: Out: 0 bytes
[8893.859] THRTL: In: 0 bytes
[8901.742] VM:IGCSc=0
[8901.742] VM:+GC(f)w=10
[8901.82] VM:-GCt=10,b=1,r=0,g=f,w=10,m=0
[8901.82] VM:+CR
[8901.828] VM:-CR t=1
[8953.726] VM:IGCSc=4
[8953.726] VM:+GC(f)w=10
[8953.796] VM:-GCt=8,b=1,r=0,g=f,w=10,m=0
[8953.796] VM:+CR
[8953.796] VM:-CR t=0
[8953.835] THRTL: Out: 0 bytes
[8953.835] SmplT: stTue Sep 17 09:49:00 GMT 2013
[8953.835] THRTL: In: 0 bytes
[8961.695] VM:IGCSc=0
[8961.695] VM:+GC(f)w=10
[8961.765] VM:-GCt=9,b=1,r=0,g=f,w=10,m=0
[8961.765] VM:+CR
[8961.773] VM:-CR t=0

 

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

Simon suggested you put debugging statements in your code and watch out for these,  As you were having problems doing this, I suggested you debug as you process.  So why are you giving us this debugging output? 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

ok please give me some debugging statements to be given in the code.

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

Simon has already told you how to do that hasn't he?

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

No he did'nt 

 

 

I have studied and gone thru

 

http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/

 

 

But in BlackBerry many errors   are shwoing like 

 

 

 

 

  1. The import javax.xml.parsers.DocumentBuilder cannot be resolved
  2. The import javax.xml.parsers.DocumentBuilder cannot be resolved
  3. The import java.io.File cannot be resolved
  4. DocumentBuilderFactory cannot be resolved
  5. DocumentBuilder cannot be resolved to a type
  6. File cannot be resolved to a type

 

So I fixed the   first 2 errors with

 

 

import net.rim.device.api.xml.parsers.DocumentBuilder;
import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

How to fix the other errors

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

"No he did'nt "

Looks to me like he did in this post:

http://supportforums.blackberry.com/t5/Java-Development/Iam-new-to-java-programming-I-have-started-J...

 

I suggested you debug as your application is running.  Have you tried that?

 

Regarding your other question, if you want to use code you pick up from elsewhere,  you will have to make sure that the code is developed for BlackBerry or J2ME.  Standard Java does not always work. Where things are missing (as they are here), you will have to create equivalents or workarounds for the classes that are not implemented. 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

Ok if that is the case please  help me with code which serves my   pupose   and application targets .

 

 

Thanks

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

Happy to help - but you might find my daily rate a bit scary....  PM me an email address if you would like to discuss this. 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I am new to java programming .I have started Java apps development and able to build the sample XML Demo given in the Eclipse SDK Version: 3.7.2 for BlackBerry OS

[ Edited ]

Hi Peter_strange

 

 

As asked  Iam giving my mail {REMOVED} and you can also Privately msg on thsi webiste i.e dveloper.blackberry.com in frums etc.

 

 

Help me my parse my xml    actuallly I am building a Live TV  app which conatins Iamges, channel names and url's which are to be parsed.

 

 

 

Mod Edit: Removed personal information to comply with Community Guidelines and Terms and Conditions of Use.

Please use plain text.