This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes java.lang.NullPointerException - canot find why Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply Bookmark "java.lang.NullPointerException - canot find why" Watch "java.lang.NullPointerException - canot find why" New topic
Author

java.lang.NullPointerException - canot find why

Peter Miklosko
Ranch Hand

Joined: May 26, 2009
Posts: 76
I'm little experimenting with FileConnection.
So far I put together this code








but when I run it I will get following errors
Anuj Prashar
Ranch Hand

Joined: Apr 15, 2008
Posts: 99

I think exception is because in MobileFileBrowser midlet changescreen method that you are calling from startApp, you are creating an instance of
of class browser.gui.FileConnDetection. Now in FileConnDetection constructor you are using mgr instance variable that has not been initialised yet.
So it is throwing null pointer exception.
Peter Miklosko
Ranch Hand

Joined: May 26, 2009
Posts: 76
Yes, I came to same conclusion. I was about to make some correction to code when I went little "off project" starting doing something else. Hopefully in week or two I will get back to it and post correction so other can have look at it.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: java.lang.NullPointerException - canot find why
 
Similar Threads
file browse J2ME
Unhandled Exception : close application
How to write to a file?
NullPointerException
Display - Best practice