How to include images which are used in my code in my jar file in java swing?

时间:2016-02-03 03:18:11

标签: java swing intellij-idea jar embedded-resource

I want to get .jar or .exe export from my java swing application. But I have a "texture" folder in which the images which are used in my swing application, are in this folder. I tried this method (I am using IntelliJ):

How to create a .jar using IntelliJ IDEA 14.1.5:

File > Save All.

Run driver or class with main method.

File > Project Structure.

Select Tab "Artifacts".

Click green plus button near top of window.

Select JAR from Add drop down menu. Select "From modules with dependencies" Select main class.

The radio button should be selecting "extract to the target JAR." Press OK.

Check the box "Build on make" Press apply and OK.

From the main menu, select the build dropdown. Select the option build artifacts.

But the jar file does not include any of the used images. How should I fix my problem?

I can email my package if any one wanted me to, too. Thank you in advance.

This the picture of structure:

image

0 个答案:

没有答案