Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NullPointerException - canot find why

 
Peter Miklosko
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 99
Android Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic