我试图在64位Windows上执行格罗比。
没有Windows库的x64位版本(至少我找不到)。它运行在64位Linux和64位JRE上,在32位Windows上运行32位JRE。所以JRE的版本并不是问题所在。
我知道我需要包含64位的Windows - libcrfpp文件。但是我找不到它。你能告诉我在哪里能找到它或者帮我执行吗?
不过,我还是犯了以下错误-
在Windows 64上使用64位JVM运行它时出错-
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.grobid.core.main.GrobidParser.<clinit>(GrobidParser.java:22)
at org.pushpin.main.Main.main(Main.java:138)
Caused by: java.lang.RuntimeException: Unable to find a native CRF++ library: Folder <FOLDER>\GROBID_HOME\.\lib\win-64 does not exist
at org.grobid.core.main.LibraryLoader.load(LibraryLoader.java:21)
at org.grobid.core.impl.GrobidFactoryImpl.init(GrobidFactoryImpl.java:35)
at org.grobid.core.impl.GrobidFactoryImpl.newInstance(GrobidFactoryImpl.java:22)
at org.grobid.core.impl.GrobidFactoryImpl.instance(GrobidFactoryImpl.java:14)
at org.grobid.core.GrobidFactory.<clinit>(GrobidFactory.java:13)
... 2 more在Windows64上使用32位JVM运行更新错误-
Caused by: java.io.IOException: Cannot run program "<project path i have removed it>\lib/pdftoxml": CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:448)
at java.lang.Runtime.exec(Runtime.java:345)
at org.grobid.core.document.Document.pdf2xml(Document.java:217)
at org.grobid.core.engines.HeaderParser.processing(HeaderParser.java:86)发布于 2012-05-28 11:31:43
从64位JVM加载32位本地库是不可能的.
但是,您可以在64位Windows上安装32位JVM,并运行使用32位本机库的Java应用程序。
更新:
这是应用程序启动程序的摘录。
private static String getLibraryFolder() {
String osPart = System.getProperty("os.name").replace(" ", "").toLowerCase().substring(0, 3);
String archPart = System.getProperty("sun.arch.data.model");
//todo: change to fetching the basic dir from GrobidProperties object
return String.format("%s/%s-%s", GrobidProperties.getInstance().getNativeLibraryPath().getAbsolutePath(),
osPart, archPart);
}应用程序正在检查属性sun.arch.data.model以获取本机库文件夹。如果在64位Windows中使用32位JVM,则
java.home=C:\Program Files (x86)\Java\jre7
os.arch=x86
os.name=Windows 7
sun.arch.data.model=32因此,使用32位JRE执行应用程序将从<FOLDER>\GROBID_HOME\.\lib\win-32加载本机库。
更新:使用32位JRE时遇到的错误与JVM体系结构无关。您应该正确安装和配置您的pdf2xml。
https://stackoverflow.com/questions/10533290
复制相似问题