IntelliJ在JavaFX JAR文件中包含外部JARS [英] IntelliJ include external JARS in JavaFX JAR file
问题描述
如何在我生成的主jar文件中包含lib下的所有jar文件?
How can I include all the jar files under lib in my main jar file produced ?
IntelliJ是否意味着创建JAR文件?因为我似乎无法使它工作。以下是我设置的一些屏幕:
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:
结果:
有人可以解释一下为什么在我的主JAR文件之外生成其他JAR文件?
Could somebody explain to me why the other JAR file is generated outside my main JAR file?
AM我应该发送2个JARS?
AM I supposed to ship 2 JARS?
推荐答案
对于一个jar来说就是这样:
Go like this for one jar:
右键单击>打开模块设置>工件> +> JAR>来自模块依赖项
Right click > Open Module Settings > Artifacts > + > JAR > From module with dependencies
然后选择主类并选择提取到目标JAR ,然后按确定。并关闭所有应用和ok'ing的对话框。
Then choose main class and select EXTRACT TO TARGET JAR, then press ok. And close all dialogs applying and ok'ing.
完成编码后,转到Build> Build Artifacts> ... jar> Build。
When done coding, goto Build > Build Artifacts > ...jar > Build.
罐子应该在那里。请务必先输入/退出。
The jar should be there. Make sure to vipe your /out before.
这篇关于IntelliJ在JavaFX JAR文件中包含外部JARS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!