Problems creating jar executable with JLayer library in Intellij [closed]

-3

Good afternoon, guys. Here's my question:

I'm creating a simple desktop application in Java 8 with swing in Intellij. At the end of some modifications I created an .jar executable and by that point everything was fine.

As of today I'm using an external library for audio playback called JLayer that runs perfectly in the application ( when I launch directly through Intellij IDE). But now that I'm going to generate an executable jar in the same way as always, when running the application (the jar executable) the sound player does not work.

The problem seems to be clear: I'm not exporting the external JLayer library that my application needs along with the jar I'm generating. Am I thinking right? And if so, how can I generate this executable in Intellij that packs also that library I need?

    
asked by anonymous 18.12.2018 / 20:53

1 answer

2

I have solved the problem. Here's how: InIntellijIDE:File->ProjectStructure...->Artifacts

In"Avaliable Elements" I had the library I needed. But I right clicked on top of the library and chose "Put Into Output Root" and it did not work. So I chose "Extract Into Output Root" and now it worked.

    
18.12.2018 / 22:47