The getLibraryPath() method from Toolkit returns first file with 'libjcurses' prefix. The problem occurs on 64bit Windows with error message: "Can't load IA 32-bit .dll on a AMD 64-bit platform".
The workaround is to rename or remove 32bit dll file, but this can be problematic while deploying program to different machines.
I suggest to check if the OS is either 32 or 64bit. For example:
String arch = System.getProperty("os.arch").toLowerCase();
boolean is64bit = "x86_64".equals(arch) || "amd64".equals(arch) || "ia64n".equals(arch);
Diff:
Hi,
Proper dll handling will be added in a future version. I just added 64-bit libraries because some people had problems compiling them - but I haven't touched the java code in 0.9.5b.
I have been working on a refactored/rewritten version of JCurses, but my NAS thought it would be a good idea to melt and burn down my living room. Anyways, I'm onto it.
Regards,
Filip Lipski