BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-17-2009, 10:17 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2009
Model: 8300
PIN: N/A
Carrier: Rogers
Posts: 43
Post Thanks: 0
Thanked 0 Times in 0 Posts
Cool Arg! New project with no code still give errors!

Please Login to Remove!

Hey all,

I am brand new to BB development, although I've developed with java many times before.

I created a new project... and before even added 1 line of code, I tried to run it and it failed with a "ControlledAccessException"

Here is what i did.

1.) Open BB JDE
2.) Created new workspace
3.) Then I created a new project. (the project appeared to go within that workspace)
4.) I then created a new empty java file... it added a couple of lines of code to it. I right clicked on the code and said "Insert into project" and selected the project i had just made.

I then when into the Debug menu and clicked "Go". It started the simulator and eventually gave me the error above.

What did i do wrong? I would think a base program with no code added would at least compile, run and have a blank screen.

Thanks for any advice you can give!
Offline  
Old 06-17-2009, 11:17 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

What lines of code did it add? Specifically, what package was declared?
__________________
My other Blackberry is a PlayBook.
Offline  
Old 06-17-2009, 01:45 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2009
Model: 8300
PIN: N/A
Carrier: Rogers
Posts: 43
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

all it added was :

Code:
package ;

/**
 * 
 */
class HelloWorld{
    HelloWorld() {    }
}
Offline  
Old 06-17-2009, 03:11 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

you should have received an error "no entry point". The BB OS calls the main() method in your application class.

Also, your application class should extend Application or UiApplication, and it must enter the dispatcher.

See the HelloWorld sample that ships with the JDE.
Offline  
Old 06-17-2009, 09:11 PM   #5 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

I suspect "package ;" is also the source of problems.

And I'm right:

Code:
package ;

/**
 * 
 */
class test {
    test() {    }
} 

D:\BlackberryDevelopment\Workshop\test.java:8: <identifier> expected
package ;
       ^
1 error
__________________
My other Blackberry is a PlayBook.
Offline  
Old 06-19-2009, 12:33 AM   #6 (permalink)
New Member
 
Join Date: Jan 2008
Model: 9530
PIN: N/A
Carrier: Verizon
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

in the menu of the JDE, open the samples project. it should be located in the install folder of the JDE. open it up, compile all the code, and see if it works. from there, edit their HelloWorld application and see what you can do.
__________________
My Dev Site: Roboconn.com Get my new OTA apps and games, some free -some not. BB friendly.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.