I've made a game using
Java in Eclipse that is supposed to use a coin dispenser as an automatic reward system. The coin dispenser came with 3 DLL's, but I can't get it to load the DLL's. This is the class I've created to load the DLL's, "CoinDispenserInterface.java":
package SubSearch;
/*import C:/Windows/System32/Coinco.MDB.dll;
import CoinDispenserInterface.dll;
import cai_mdb_w32d.dll;//*/
class CoinDispenserInterface
{
public native void inDll();
public static void main(
String[] args)
{
System.out.println ("dispensing coin in interface");
//new CoinDispenserInterface().dispenseCoin();
}
static
{
System.out.println ("Loading DLLs");
System.loadLibrary("C://WINDOWS//system32//cai_mdb_w32d.dll");
System.loadLibrary("C://Documents and Settings//Devin//My Documents//Dropbox//" +
"PsychologyDept//workspace//SubSearch//DLLs//Coinco.MDB.dll");
System.loadLibrary("C://Documents and Settings//Devin//My Documents//Dropbox//" +
"PsychologyDept//workspace//SubSearch//DLLs//CoinDispenserInterface.dll");
System.out.println ("Loading complete");
}
}
When I use System.loadLibrary I get a java.lang.UnsatisfiedLinkError that says the cai_mdb_w32d.dll isn't in the java.library.path, which doesn't make sense b/c when I click on configure build path, it's listed there.
When I use System.load I get the same error with a different explanation: "This application has failed to start because the application configuration is incorrect." It suggests reinstalling the application.
I've tried storing the 3 DLL's in the C:/WINDOWS/System32 folder, but it didn't seem to help. Even if I were to get this to work, I don't understand how this class's main() is supposed to work with the main() my game already has.
Any help is greatly appreciated.