Problems creating executable jar with Jlayer library in Intellij

Asked

Viewed 144 times

-3

Good afternoon guys. Here comes my question:

I am creating a simple java 8 desktop application with swing in Intellij. At the end of some modifications I was creating a .jar executable and up to that point all right.

As of today I am using an external library for call audio playback Jlayer that runs perfectly in the application (when I throw directly by IDE Intellij). But now that I will generate a jar executable in the same way as always, when running the application (the executable jar) the sound player does not work.

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

1 answer

2

I already solved the problem. Here’s how: inserir a descrição da imagem aqui In IDE Intellij: File -> Project Structure... -> Artifacts

In "Avaliable Elements" I had the library I needed. But I would right-click on the library and choose "Put Into Output Root" and it wouldn’t work. So I chose "Extract Into Output Root" and now it worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.