java - Exporting executable jar changes directory of images -


I have a problem exporting my Eclipse project to executable jars, I think I correct it but jar Closes as compared to closing, so I tried with "java -jar nameofproject.jar" and it says:

  Unable to load image: / images / dialogs / server- Exception in the database.png thread "AWT-EventQueue-0" Java.lang.NullPointerException javax.swing.ImageIcon. & Lt; Init & gt; (Unknown source) ....  

So I uncompressed the jar and saw the directory structure in it and I was surprised to see that my "image" package was an unwanted "source" directory It was made in JVM, making JVM impossible to find them.

Then the original project structure in Eclipse is:

Enter the image details here

And here is the directory structure unpack jar:

(The image directory is under" src "directory, which prevents jvm from searching images)

Any ideas about how to resolve it ?


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -