Skip to content

Troubleshooting

Jason Winnebeck edited this page Jul 6, 2016 · 2 revisions

Troubleshooting tips

The Allegro library must be loadable to use the jalleg-binding. Jalleg uses JNA to load the library and tries multiple ways to find the Allegro library.

The simplest way is one of the following:

  1. Include a jalleg-rt, such as jalleg-rt-win32-x86-64, which includes a pre-built Allegro library that jalleg will unpack and use. Currently only a Windows 64-bit version exists.
  2. On Linux, install Allegro from a repository such as the Ubuntu PPA for Allegro or Fedora repository.

You can also compile Allegro from source and install as normal.

When JNA tries to find a library, it follows the process described here. In short, it tries to load the unpacked library first from jna.library.path, then from normal OS paths, then will look in JARs.

If you have an Allegro "monolith" library, you can set Java property or environment variable AL_NAME to point to it, and jalleg will attempt to load it first.

JNA Native Loading

If you see Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native, this may be related to JNA issue 281, the solution being to add -Djna.nosys=true.

Clone this wiki locally