本文介绍了Jacob.jar 找不到 jacob-1.18-x86.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写使用 autohotkey 的 Java 代码,特别是 autoitx4java 实现.我有进口

I am trying to write Java code that uses autohotkey, specifically the autoitx4java implementation. I have the imports

import java.text.SimpleDateFormat;
import java.util.Date;
import autoitx4java.AutoItX;

以及在构建路径中添加了 Jacob.jar、AutoItX4Java.jar 和 sqljdbc4.jar(sql jdbc 用于代码的其他部分).由于不满意的链接错误,它无法编译:

As well as have added Jacob.jar, AutoItX4Java.jar and sqljdbc4.jar in the build path (sql jdbc is for other parts of the code). It doesn't compile because of an unsatisfied link error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jacob-1.18-x86 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:184)
    at com.jacob.com.JacobObject.<clinit>(JacobObject.java:110)
    at autoitx4java.AutoItX.<init>(AutoItX.java:181)
    at MainTest.login(MainTest.java:126)
    at MainTest.setadmin(MainTest.java:181)
    at MainTest.runbasic(MainTest.java:21)
    at MainTest.main(MainTest.java:15)

我在 system32 文件夹中有 jacob-1.18-x86.dll(Windows 8.1 是操作系统)以及 jacob-1.18-x64.dlljacob-1.18-M3-x64.dll,以防万一它想使用 64 位 dll.我尝试将 C:/Windows/System32 添加到 jacob.jar Native library location"(使用 eclipse)来自某个网​​站,但这没有用.其他一些站点建议将 dll 放在 C:Program FilesJavajre7in 文件夹中,所以我这样做了,但它仍然抛出错误.这段代码曾经在不同的机器上工作,但现在由于不满意的链接而无法编译.我不知道把 jacob-1.18-x86 放在哪里才能找到它.

I have the jacob-1.18-x86.dll in the system32 folder (windows 8.1 is the OS) as well as jacob-1.18-x64.dll and jacob-1.18-M3-x64.dll, just in case it wanted to use the 64 bit dll. I tried adding C:/Windows/System32 to the jacob.jar "Native library location" (using eclipse) from some website, but that didn't work. Some other site suggested putting the dll in the C:Program FilesJavajre7in folder, so I did that, but it still throws the error. This code used to work on a different machine, but now it won't compile because of the unsatisfied link. I can't figure out where to put the jacob-1.18-x86 to get it to find it.

推荐答案

嗯,复制到C:显然它只在那里寻找 jacob dll.

Well, copied it into the "C:Program Files (x86)Javajre1.8.0_65in" folder and it worked. Apparently it only looks there for the jacob dll's.

这篇关于Jacob.jar 找不到 jacob-1.18-x86.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-10 03:22