BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-09-2009, 03:22 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 7100t
PIN: N/A
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Error launching simple application in JDE: NoSuchFile.java

Please Login to Remove!

Hello,

I created a simple application with the JDE but I can't launch it.
When I do, with the JDE, I get the following exception:

Uncaught Exception thrown - RuntimeException - C:\NoSuchFile.java

I put a breakpoint at the beggining of my Midlet class, so the application stops here when I launch it but as soon as I go one step further (doesnt matter if I step over or into) i get the exception

Here is the code
Code:
public class MainBB extends UiApplication {
public MainBB() {
        {
            pushScreen(new WelcomeScreen());
        }
}
    }
edit: I tried modifying the code but I still get an exception if I surrond the whole thing iwth a try catch
Code:
  public MainBB () {
        try {
            pushScreen(new WelcomeScreen());
        } catch (Exception ex) {
            System.out.println("DEBUG: " + ex.getMessage());
        }   
    }
Do you have any idea what I missed? (Maybe in configuration, I don't know)
thanks

Last edited by yann247 : 04-09-2009 at 03:36 PM.
Offline  
Old 04-09-2009, 11:11 PM   #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

You need a main method in your main class (from the HelloWorldDemo):
Code:
class HelloWorldDemo extends UiApplication
{
    /**
     * Entry point for application. 
     */
    public static void main(String[] args)
    {
        // Create a new instance of the application.
        HelloWorldDemo theApp = new HelloWorldDemo();
        
        // To make the application enter the event thread and start processing messages, 
        // we invoke the enterEventDispatcher() method.
        theApp.enterEventDispatcher();
    }

    /**
     * <p>The default constructor. Creates all of the RIM UI components and pushes the
     * application's root screen onto the UI stack.
     */
    private HelloWorldDemo()
    {
        // Push the main screen instance onto the UI stack for rendering.
        pushScreen(new HelloWorldScreen());
    }    
}
Good work formating your code properly for posting by the way. You've been reading.

Oh and NoSuchFile.java just means that the exception was thrown in code for which the simulator couldn't find source. In this case 'cause it was thrown in RIM code when the application launcher couldn't invoke public static void main(String[] args)

Last edited by hrbuckley : 04-09-2009 at 11:16 PM.
Offline  
Old 04-10-2009, 10:20 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 7100t
PIN: N/A
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Indeed, thanks.
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.