我買了一臺愛普生TM-T88IV熱敏打印機。我使用安裝手冊安裝了Epson JavaPOS ADK。JavaPOS - Epson TM-T88IV - Eclipse中的UnsatisfiedLinkError
然後,我在Eclipse中添加了Epson JavaPOS的lib文件夾中的Jar-Files,並編寫了一個連接到打印機的簡單程序。
public class MainClass {
public static void main(String[] args)
{
//System.out.println("Ausgabe aus der main()-Methode");
POSPrinterControl113 ptr = (POSPrinterControl113)new POSPrinter();
try {
//Open the device.
//Use the name of the device that connected with your computer.
ptr.open("EPSON_TM_T88IV");
//Get the exclusive control right for the opened device.
//Then the device is disable from other application.
ptr.claim(1000);
//Enable the device.
ptr.setDeviceEnabled(true);
}
catch(JposException ex) {
}
}
}
但我收到這些錯誤:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jp_co_epson_upos_firm_FirmNativeAccess_1_13_0001 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 jp.co.epson.upos.core.v1_13_0001.pntr.CommonPrinterService.<clinit>(CommonPrinterService.java:1004)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at jp.co.epson.uposcommon.util.EpsonJposServiceInstanceFactory.createInstance(EpsonJposServiceInstanceFactory.java:142)
at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source)
at jpos.BaseJposControl.open(Unknown Source)
at MainClass.main(MainClass.java:15)
它可以打印的東西與「CheckHealth.bat」
有一個人一個想法,以解決這個問題?
此致
Meinzelmaenchen
- 我使用的Windwos 8.1(64位)
- 熱敏式打印機是通過USB連接
- 的EPSON JavaPOS的ADK的版本爲1.13 .15
- 安裝了Java JDK和JAI的最新32位Java版本