问题
In IntelliJ I created a simple program(Im a beginner) and Im trying to create a runnable JAR file so I can run the program on a different computer. But when I tried it on a different computer, It gave me this error, Im not sure if its something wrong on the computer or the runnable JAR:"A JNI error has occured. Please check your installation and try again". However It works perfectly if I run the program on my computer.
I created runnable JAR using this guide: https://www.jetbrains.com/help/idea/creating-and-running-your-first-java-application.html
Can someone tell me what I did wrong?
回答1:
JNI is a java native interface and it is responsible for native libraries. They are not in your JAR if you don't cared about it. Most IDEs can autoinclude that libs for you if you select option while creating jar file :)
来源:https://stackoverflow.com/questions/54579850/intellij-runnable-jar-doesnt-work-on-other-computers