code-disaster / steamworks4j

A thin Java wrapper to access the Steamworks API
https://code-disaster.github.io/steamworks4j/
MIT License
479 stars 67 forks source link

SteamAPI.restartAppIfNecessary(APPID) not working #58

Closed AlrikG closed 6 years ago

AlrikG commented 7 years ago

Hi, I've got this error message after calling SteamAPI.restartAppIfNecessary(APPID) as the very first command:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.codedisaster.steamworks.SteamAPI.restartAppIfNecessary(I)Z
    at com.codedisaster.steamworks.SteamAPI.restartAppIfNecessary(Native Method)
    ...

I tried to fix the problem but I have no idea whats wrong with it.

code-disaster commented 6 years ago

You need to call SteamAPI.init() first, which makes the native method available.

AlrikG commented 6 years ago

That works thank you. But you have to make sure that "steam_appid.txt" is not in the working folder.