IntelliJ runnable jar doesn`t work on other computers

南笙酒味 提交于 2021-01-29 08:29:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!