GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes Error loading image jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Error loading image jar" Watch "Error loading image jar" New topic
Author

Error loading image jar

Nouf Nassri
Ranch Hand

Joined: Apr 22, 2010
Posts: 40
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
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10426
    
    8

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Nouf Nassri
Ranch Hand

Joined: Apr 22, 2010
Posts: 40
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error loading image jar