转自: http://blog.163.com/liwei3324@126/blog/static/47452426201332292043791/
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jacob-1.15-M4-x86 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:184)
at com.jacob.com.JacobObject.<clinit>(JacobObject.java:107)
at com.livemate.MSWordManager.<init>(MSWordManager.java:31)
at com.livemate.Demo.main(Demo.java:8)
将jacob-1.15-M4-x86.dll放入D:\Program Files\Java\jdk1.6.0_06\bin即可。
如果不清楚java.library.path,输出一下即可。代码如下
System.out.println(System.getProperty("java.library.path"));