0

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?

Alon
  • 687
  • 1
  • 6
  • 10
  • Does the other computer have the same version of JRE and have the JAVA_HOME env variable defined? – William Feb 07 '19 at 18:26

1 Answers1

0

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 :)

m.s
  • 39
  • 1
  • 5
  • For intellij - https://stackoverflow.com/questions/1051640/correct-way-to-add-external-jars-lib-jar-to-an-intellij-idea-project – m.s Feb 07 '19 at 20:22