Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in run code on eclipse !!!

 
mahdi farzami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
mahdi farzami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it`s only need a F5 !!! it`s need a refresh to include file to project
 
him jain
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so, is it working or not after "F5"?
 
mahdi farzami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it`s worked
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic