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: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

I have imported java application example i.e streamingplayer and tried to run as java application.

I have imported java application example i.e streamingplayer       from  the link/page

 

 

http://supportforums.blackberry.com/t5/Java-Development/Streaming-media-Start-to-finish/ta-p/488255

 

 

 

 

and tried to run as java application.

 

 

 

Then the following errors reflcted they are :

 

 

Could not find the main clas

 

rimx.streamingtest.StreamingPlayerSample.Program will exit.

 

 

Problemss found are :

 

 

Description Resource Path Location Type
Unbound classpath container: 'JRE System Library [BlackBerry JRE 4.5.0]' in project 'StreamingPlayer' StreamingPlayer Build path Build Path Problem

 

 

 

Please rectify this  or solve th my query.

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

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

check the build path of the project and set a correct JRE
----------------------------------------------------------
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: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

[ Edited ]

Hi Simon Iam very new to BlackBerry and its SDFK and first of all java. So Please kindly explain where can I check th build path

 

 

and How to set correct JRE ?

 

 

Yes I have found the following in the code

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="res"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/net.rim.ejde.BlackBerryVMInstallType/BlackBerry JRE 4.5.0"/>
<classpathentry kind="output" path="bin"/>
</classpath>

 

 

 

Please tell me what changes to be done.

 

 

My BlackBerry SDK details are :

 

 

Eclipse SDK

Version: 3.7.2
Build id: M20120208-0800

(c) Copyright Eclipse contributors and others 2000, 2012. All rights reserved.
Visit http://www.eclipse.org/platform

This product includes software developed by the
Apache Software Foundation http://www.apache.org/

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

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

right click on the project, select java build path, select libraries, select JRE System Library, Select Edit, select Alternate JRE, select an installed BlackBerry JRE
----------------------------------------------------------
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: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

Yes I tried the same steps which you mentioned But errors increased after that

 

Now the Alternate JRE showing  is   "  BlackBerry JRE 7.1.0"

 

 

And the installed JRES's  showing are    JRE 7.1.0 and jre6

 

where jre6 is marked  .

 

Anything to be added ?

 

 

 

. Can u   tell in detail again   the required  changes for

 

me .

 

 

 

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

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

it seems you only have 7.1 installed.
you can install other JREs using the update site for eclipse.
for now, remove all references to jre6
----------------------------------------------------------
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: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

when I checked for Updates for my java plugin (eclipse)  installed   already  . It is saying "No Updates found"

 

 

Pease explain the configuring building path

 

step by step and what to selct and what not ?

 

 

steps:

 

Right click on the project -> Build Path ->    configure build path->Java Build Path->  Selected  JRE system library 7.1->Edit-Alternate JRE selected and showing as JRE (7.1.0)-> clicked Installed JRE's   JRE 6 removed and 7.1.0  kept as it  is and marked.

 

 

 

Please guide me If Iam wrong 

 

 

 

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

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

I think you should actually go right back to the start.

 

Remove everything that you have currently down, download the full installer and install it.  Then try out the samples that come with the download and make sure that this is working for you.  Once we have an environment that is actually working we can move forward.  At present we are shooting in the dark.

 

With respect to importing your external package, be aware that just because it is Java, does NOT mean it will run on the BlackBerry.  If what you are downloading runs as a standard Java application on a desktop or in a Browser, I can guarantee that it will NOT work.  BlackBerry API and normal Java share no UI controls.  So if your code creates a User interface, that will not run on the BlackBerry.

Developer
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

Hi peter Yes I have rermoved the plugin and hence instaled frresh  java plugin.

 

 

 

java plugin

 

 

Eclipse SDK

Version: 3.7.2
Build id: M20120208-0800

 

 

Please guide me How to build as a sample hellowo/rld java application and also import the already given sampl apps

 

 

at   https://developer.blackberry.com/java/samples/.

 

 

when I try to import and run the messagelist application. It is showing the error " Selection does not conatain   a maain type

 

"Description    Resource    Path    Location    Type
FragmentTabHost cannot be resolved to a type    FragmentTabsFragment.java    /Support13Demos/src/com/example/android/supportv13/app    line 28    Java Problem
"

 

 

"Description    Resource    Path    Location    Type
ViewPager cannot be resolved to a type    FragmentNestingPagerSupport.java    /Support13Demos/src/com/example/android/supportv13/app    line 85    Java Problem
"

"Description    Resource    Path    Location    Type
TaskStackBuilder cannot be resolved    InterstitialMessageActivity.java    /SupportAppNavigation/src/com/example/android/support/appnavigation/app    line 35    Java Problem
"

 

 

 

"Eclipse SDK

Version: 3.7.2
Build id: M20120208-0800
"

 

 

etc

 

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

Re: I have imported java application example i.e streamingplayer and tried to run as java application.

android should be a hint there.
blackberry java is not compatible to android.

are you sure that you downloaded eclipse+plugin from https://developer.blackberry.com/java/
?
if not, do so.
----------------------------------------------------------
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