I don't know what IntelliJ is so I'm not sure how helpful this will be, but I did do something like this with LWJGL a couple of years ago.
LWJGL depends on native libraries, and the operating system depends on loading those from real native files. You can't load them from inside a jar. So, you can put them in the jar, but you'll have to write some code (which runs before you try to call any LWJGL stuff) which will extract the needed native(s) from the jar at run time and save them in the system temporary directory (or wherever) then load them with System.load
.
Then you have to remove/comment out the normal library loading code from org.lwjgl.Sys
(the functions doLoadLibrary
and loadLibrary
). That should do it.
Edit: A similar question is here: How to make a JAR file that includes DLL files?