-1

After exporting my game to jar it does not work. Exception in thread "main" java.lang.UnsatisfiedLinkError: no jinput-dx8_64 in java.library.path

I read that I have to put the files anywhere in my computer and add the .dll files path to java.libraty.path, but, will it work if I try the game in another computer?

Tanks :D

esteve
  • 50
  • 9

2 Answers2

0

If you are working on windows, just add the path of the dll file along with the java path in environment variable. For example. If your dll file is present in jdk/jre/bin,path=C:\Program Files\Java\jdk1.8.0_25\jre\bin. Just try this one. Once worked for me.

Guru
  • 411
  • 3
  • 20
  • Tanks! But, will it work if I send the game to anybody? – esteve Jan 18 '17 at 17:48
  • No. It will work only in your system. Instead you can bind the dll file into your project. I guess [this](http://stackoverflow.com/questions/11123274/add-dll-to-java-library-path-in-eclipse-pydev-jython-project) will help you. – Guru Jan 18 '17 at 17:53
0

In the newest version of LWJGL3, the native files are contained inside jars and your application can be exported to a jar very easily by simply including the jars containing the native files on the classpath. LWJGL3 can be download from here: https://www.lwjgl.org/download. This solution will work no matter what machine the game is played on, as long as the native jar corresponding to the OS is included in the game's jar.

pdid
  • 367
  • 2
  • 15