简体   繁体   中英

Create Jar With External Libraries(Intellij Idea 2017)

I created a simple application using IntelliJ.I exported my project to a jar file and Every Thing was fine and jar file worked properly. Now I decide to use jfoenix.jar in my project for button and text fields.I add a jfoenix to my project and it works fine in the intellij environment but when I export my project to the jar it doesn't work(I click on the jar file which is created and nothing happens). I know my problem is related to the jfoenix.jar library because it seems that it doesn't attach to my project properly but I don't know how to attach external libraries like jfoenix.jar to my project for creating a jar file of the project. Maybe I did something wrong in my steps.

I follow below steps to create jar in IntelliJ:

1-Project Structure->build artifact->select the main class->Ok.

2-Build->Build Artifacts

I check this post "Adding external library to artifact jar in IntelliJ IDEA" but my problem doesn't solve with the solution. If I omit the Jfoenix from the artifact it works properly but when I attach it in the artifact jar file does not work at all.

Apparently, the issue was with running on Java 9, similar to the one reported here . The solution is to either run on Java 8 or use the Jfoenix jar version built specifically for Java 9.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM