File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes problem in run code on eclipse !!! 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 "problem in run code on eclipse !!!" Watch "problem in run code on eclipse !!!" New topic
Author

problem in run code on eclipse !!!

mahdi farzami
Ranch Hand

Joined: Nov 21, 2009
Posts: 32
Hi ,
i have problem to run my code in eclipse !!! whene i run this code on netbeans it`s successful runs but on eclipse this error is shown :
Null Pointer java/lang/NullPointer Exeption


i copy image file (1.jpg) in res directory . i know problem is here but i dont know why ???
can any body help to me ???
thanks
him jain
Ranch Hand

Joined: Feb 05, 2010
Posts: 56
I think, ofcourse, you know what actually the error is:
that your program is not able to locate where the image lies, that's why it's resulting in a null.
Try this thing once:
keep image any where you want and in the createimage function pass the full path of that particular image.
Like save it on desktop and instead of " x = Image.createImage("/1.jpg"); "
use " x = Image.createImage("/Home/Stranger/Desktop/1.jpg"); "

Then let us know, if still there's any problem.


--Himanshu Jain
http://jainhim.blogspot.com/
mahdi farzami
Ranch Hand

Joined: Nov 21, 2009
Posts: 32
it`s only need a F5 !!! it`s need a refresh to include file to project
him jain
Ranch Hand

Joined: Feb 05, 2010
Posts: 56
so, is it working or not after "F5"?
mahdi farzami
Ranch Hand

Joined: Nov 21, 2009
Posts: 32
yes it`s worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in run code on eclipse !!!
 
Similar Threads
it doesn't give me the country name
it doesn't change the longitude & latitude
Is this Dao?
How can i use mouse to click on an image and draw a point after i clicked ?
Beginning Java Games