View Single Post
Old 04-04-2008, 09:58 AM   #1 (permalink)
Knows Where the Search Button Is
Join Date: Apr 2006
Model: 8300
Carrier: att
Posts: 42
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default BlackBerry Newb question.. symbol exception.

Please Login to Remove!

Im working through several samples from the JDE and have copied and pasted my way to an application..

can someone please tell me why im getting the following error? I have imported the proper packages. I think, at least it doenst help when I add the package the error is referring to. I have posted to another forum and it was suggested that I might simply need to change the offending line to ..
setTitle("MyUiApplication"); but I still get the same error. Help !

Building mytest
C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin\rapc.exe -quiet import="..\..\..\..\..\Program Files\Research In Motion\BlackBerry JDE 4.3.0\lib\net_rim_api.jar" codename=..\mytest\mytest ..\mytest\mytest.rapc warnkey=0x52424200;0x52435200;0x52525400 "C:\Documents and Settings\xnxx\Desktop\jbmJDE\mytest\com\sample\MyU"
C:\Documents and Settings\xnxx\Desktop\jbmJDE\mytest\com\sample\MyU cannot find symbol
symbol : method setTitle(net.rim.device.api.ui.component.LabelFiel d)
location: class MyUiApplication.MyMainScreen
1 error
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\xnxx\LOCALS~1\Temp\rapc_2089cc40.dir -bootcla ...
Error while building project

---- here is the .java code ----
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;

* BlackBerry applications that provide a user interface
* must extend UiApplication.
public class MyUiApplication extends UiApplication {

public static void main(String[] args) {
//create a new instance of the application
//and start the application on the event thread
MyUiApplication theApp = new MyUiApplication();

public MyUiApplication(){
//display a new screen
pushScreen(new MyMainScreen());

//create a new screen that extends MainScreen, which provides
//default standard behavior for BlackBerry applications
public final class MyMainScreen extends FullScreen {
public MyMainScreen() {

//invoke the MainScreen constructor

//add a title to the screen
LabelField title = new LabelField("MyUiApplication",
LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title); //If I comment this line the error goes away

//add the text "Hello World!" to the screen
add(new RichTextField("MyUiApplication"));

//override the onClose() method to display a dialog box to the user
//with "Goodbye!" when the application is closed
public boolean onClose(){
return true;

protected boolean navigationMovement(int dx, int dy, int status, int time) {
//System.out.println( "navigationMovement: x= " + dx + " y= " + dy );
add(new RichTextField("navigationMovement: x= " + dx + " y= " + dy ));
return true;
Offline   Reply With Quote