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: 171
Registered: ‎03-04-2009
My Device: Not Specified

Problem with HTTPPushDemo

I have a problem with the application httppushdemo. I follow the steps in the readme.txt, but I have a problem when running the run.bat of HTTP Push Demo Server. I get the following message:

 

 

Microsoft Windows XP [Versión 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\alonsa03>cd C:\Archivos de programa\Research In Motion
\BlackBerry JDE 4.5.0\samples\com\rim\samples\server\httppushdemo

C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.5.0\samples\com\rim\
samples\server\httppushdemo>run.bat
No se encuentra C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.5.0\
samples\com\rim\samples\server\httppushdemo\*.class
"javac" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Exception in thread "main" java.lang.NoClassDefFoundError: com/rim/samples/serve
r/httppushdemo/HTTPPushDemo
Caused by: java.lang.ClassNotFoundException: com.rim.samples.server.httppushdemo
.HTTPPushDemo
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: com.rim.samples.server.httppushdemo.HTTPPushDemo.
  Program will exit.

 

I created the file .class, but the run and gives the same error, and delete the files that I created, did anyone know that happens? thanks

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem with HTTPPushDemo

with google translate:
is your java path correctly set?
----------------------------------------------------------
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
Developer
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Re: Problem with HTTPPushDemo

Yes, the java path is correctly...
Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem with HTTPPushDemo

try to run javac from the command line.

at least your error message says, according to google translate:
"javac" is not recognized as an internal or external command,
program or batch file executable.
----------------------------------------------------------
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
Developer
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Re: Problem with HTTPPushDemo

I have done that and displays the following:

 

 

Microsoft Windows XP [Versión 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

 

C:\Documents and Settings\alonsa03>cd C:\Archivos de programa\Java\jdk1.5.0_04\b
in

C:\Archivos de programa\Java\jdk1.5.0_04\bin>run.bat
Note: HTTPPushDemo.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Exception in thread "main" java.lang.NoClassDefFoundError: com/rim/samples/serve
r/httppushdemo/HTTPPushDemo
Caused by: java.lang.ClassNotFoundException: com.rim.samples.server.httppushdemo
.HTTPPushDemo
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: com.rim.samples.server.httppushdemo.HTTPPushDemo.
  Program will exit.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem with HTTPPushDemo

take a look at the run.bat file.
it calls javac (the java compiler), changes the directory and runs HTTPPushDemo on the java VM.
you can do this without the script. or you can use the script but have to run it in the correct directory (or modify it).

please see here how to set the java path:
http://www.java.com/en/download/help/path.xml
----------------------------------------------------------
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
Developer
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Problem with HTTPPushDemo

read the readme.txt properly. I lost lots of hours then I read the readme and found that port 100 was blocked in mds simulator. read that first whoever is having problem with httppushdemo application.

----------------------
Press like if you find a message helpful
---------