Jna调用问dll,报错
#
# A fatal error
has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0550e3db, pid=2632, tid=5724
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [tesseract.dll+0x1ee3db]
#
# An error report file with more information is saved as:
# D:\Users\workflow\scdps_scn\hs_err_pid2632.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Tesseract Open Source OCR Engine v3.01 with Leptonica
Error opening data file ./tessdata/chi_sim.traineddata
解决方案:一开始还以为是jre环境有问题,找了半天,记过不是。是c++给的文件夹tessdata不应该放在jdk或jre的bin下,而应该放到java项目的根目录下。
但其他dll文件可以放到jdk的bin下或者放到项目的根目录下。