• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error loading image jar  RSS feed

 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello here is my problem. I just made a little application in this application so I must have an image in system stray so everything works when I run the application with netbeans but I launch it in a jar executable impossible to image

code



there may be mistakes or I can not use well a function of java to insert an image
thanks
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When your image/resources are inside a jar, you need to load them in a different way using getClass().getResource() or getClass().getResourceAsStream().
Search the forums. This topic has been discussed before.
 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:When your image/resources are inside a jar, you need to load them in a different way using getClass().getResource() or getClass().getResourceAsStream().
Search the forums. This topic has been discussed before.



thank you very much
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!