I have a Java project, which based on multiple third-party Java libraries (JARs) when I run this application inside of IDEA everything is OK and works.
The project structure is:
— LIBS //third-party libraries
— MODULE // my module with sources
Now I want to deliver the application to the customer as a one solid JAR file, which should be executed with java -jar myApp.jar. I defined attributes, specified the main class, and classpath and generated a JAR. I checked inside of this JAR, it contains all third-party libraries I use in my application.
The problem is when I execute this JAR it returns error «Can't find third-party libraries» but when I put the LIBS folder in the same folder where my JAR is stored, everything is working.
Is it possible to implement in IDEA the built-in feature, which will generate ready-to-use JAR file, which will not require from the user to deal with third party libraries? It will be cool if IDEA could generate the JAR file I can send to a customer, which could run it without any movements, just call java -jar myApp.jar.
Of course, I can try to deal with some approaches as One-JAR but it will be great if IDEA could do it for me automatically.