I am trying to use SVMLight from Java, using the JNI wrapper on this page:
static {
System.loadLibrary(\"lib/JNI_SVM-light-6.01/lib/svmlight\");
}
Got this from - http://blog.cedarsoft.com/2010/11/setting-java-library-path-programmatically/
If set the java.library.path, need to have the following lines in order to work.
Field fieldSysPath;
fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
fieldSysPath.setAccessible( true );
fieldSysPath.set( null, null );
Yes, you'll have to recompile the DLL for 64-bit. Your only other option is to switch to a 32-bit JVM, or otherwise get some 32-bit process to load the DLL on your behalf and communicate with that process somehow.
I had the same issue with a Java application using tibco dll originally intended to run on Win XP. To get it to work on Windows 7, I made the application point to 32-bit JRE. Waiting to see if there is another solution.
Just go to install download jdk_x86 and it install in Program Files (x86) and set the jre path in your project. Thats it.
For your Native library location, use X64 over X86. At least this fixed problem I had.
I had a problem when run red5(tomcat) on Windows x64 that previous worked under Windows x32, got next error:
INFO pool-15-thread-1 com.home.launcher.CommandLauncher - Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\....\lib\Data Samolet.dll: Can't find dependent libraries
INFO pool-15-thread-1 com.home.launcher.CommandLauncher - at java.lang.ClassLoader$NativeLibrary.load(Native Method)
Problem solved when I installed Java x32 version and set next
"Environment variables"
"User variables for Home"
JAVA_HOME => C:\Program Files (x86)\Java\jdk.1.6.0_45
"System variables"
Path[at the beginning] => C:\Program Files\Java\jdk.1.8.0_60;..