What kind of an error? If it's an exception, can you just catch it?
Another approach would be to make exactly one class responsible for loading the library. You could make loading the library part of the class's static initializer, and then loading the class == loading the library.
EDIT: the javadocs for Runtime.loadLibrary() (which System.loadLibrary calls) even suggests the static initializer approach:
If native methods are to be used in the implementation of a class, a
standard strategy is to put the native
code in a library file (call it
LibFile) and then to put a static
initializer:
static { System.loadLibrary("LibFile"); }
within the class declaration. When the class is loaded and initialized,
the necessary native code
implementation for the native methods
will then be loaded as well.
The javadocs also say:
If this method is called more than once with the same library name, the second and subsequent calls are ignored.
which makes me even more curious about the error you're getting.