0

So what im trying to do is to build a JAR artifact which should include the necessary libraries as well as directories which are outside of the JAR file and can be looked at in the explorer.

I have already tried to add directories to the artifacts but these get put into the JAR file in a folder which i cant access later when converting it to a exe using launch4j.

Is there an option in Intellij to exclude directories from building into a JAR?

Edit: I want the output directory like this Directory Structure

Andrew J
  • 1
  • 1
  • *what im trying to do is to build a JAR artifact which should include the necessary libraries as well as directories* and *Is there an option in Intellij to exclude directories from building into a JAR?* seem to be contradictory... You don't need 3rd party stuff like launch4j now as you can use the [jdk itself](https://technojeeves.com/index.php/aliasjava1/111-making-native-installable-apps-with-java-9) – g00se Sep 29 '22 at 11:48
  • The installer is a problem when others dont have permission to execute it. Sorry for not telling you before – Andrew J Sep 29 '22 at 12:31
  • Sorry - I don't understand – g00se Sep 29 '22 at 12:40
  • From the link you send me you are trying to use a installer to install the application. This could create issues regarding the permission rights of other users in the network when they try to execute it since they need to install a Java interpreter. Since lauch4j is a easy to use GUI tool i prefer it to create a executable instead of using console commands – Andrew J Sep 29 '22 at 12:53
  • Unless I'm mistaken, launch4j is *also* an installer. You can even get it to install other stuff alongside the Java app, afaicr – g00se Sep 29 '22 at 13:11
  • Yeah that true Launch4j is an open source installer, but it creates an exe before distributing it to the end user whereas your idea was to give the installer to every user? It seems to me that launch4j is more user-friendly with just executing a exe or am i understanding your intentions wrong? – Andrew J Sep 29 '22 at 13:47
  • The JDK can create an exe or an msi for WIndows – g00se Sep 29 '22 at 14:25
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 29 '22 at 15:52
  • I just need to have an extra directory in the output folder with content from my project like a chromedriver that i wouldnt want to copy paste around. Is it possible to do such a task? – Andrew J Sep 30 '22 at 06:29
  • Please see if https://stackoverflow.com/a/42200519/12844632 helps – Egor Klepikov Sep 30 '22 at 07:31
  • This approach puts the directories into the JAR file which did not work for my application. I need the folders outside the JAR file to use it – Andrew J Oct 04 '22 at 10:09

0 Answers0