| 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
|
 |
 |
|
|
subject: problem in run code on eclipse !!!
|
|
|