[java] Nullpointer exception j2me

Started by
11 comments, last by maximuz_2 18 years, 5 months ago
It has to do with classpath. Check out your classpath, in the project properties, and make sure to add the directory of your resources to the list. Then you'll be able to load files using an abstract path.

I like to use apache ant because it makes your project "ide-independent". Also, you have full control of the building and deployment of your project, and you can work with many situations using simple syntax.

Son Of Cain
a.k.a javabeats at yahoo.ca
Advertisement
you can let you image to the director of your_project/classes/ , with the pacage of your pacage, but the image will be delete after you rebuild the project. the better way is create the .jar and .jad. if the use the jbuilderX Wizards->Archive Builder... add the image to the project.
good luck
Hi i solved the problem!!! It was so simple!! In jbuilder, the image files r to
be pasted inside src folder itself!!! unlike wireless toolkit where there is a separate folder 'res' for images....for the user who posted::
--------------------------------------------------------------------------------
Reply Quoting This MessageEdit Message Anonymous Poster
Posted - 10/21/2005 5:04:08 AM
Hi guys,

Im having the same problem, but with the Toolkit, and Netbeans. Man this is frustrating... nullpointer ... such a simple thing.

can it maybe have something to do with creating a package?
-------------------------------------------------------------------------------
well ur package is screwed only if u get javaClassnotfound exception. As long as u get the nullpointer exception, u better check for misplaced res files and nullrefernces to objects in ur code....

This topic is closed to new replies.

Advertisement