IntelliJ include external JARS in JavaFX JAR file

2020-06-05 01:28发布

How can I include all the jar files under lib in my main jar file produced ?

Is IntelliJ meant to create JAR files or not ? Cause I can't seem to make it work. Here are some screens from my setup:

enter image description here

And the result:

enter image description here

Could somebody explain to me why the other JAR file is generated outside my main JAR file?

AM I supposed to ship 2 JARS?

1条回答
在下西门庆
2楼-- · 2020-06-05 01:56

Go like this for one jar:

Right click > Open Module Settings > Artifacts > + > JAR > From module with dependencies

Then choose main class and select EXTRACT TO TARGET JAR, then press ok. And close all dialogs applying and ok'ing.

When done coding, goto Build > Build Artifacts > ...jar > Build.

The jar should be there. Make sure to vipe your /out before.

查看更多
登录 后发表回答