JavaPOS-Epson TM-T88IV-Eclipse中不满意的链接错误
我买了一台爱普生TM-T88IV热敏打印机。我使用安装手册安装了Epson JavaPOS ADK 然后,我在Eclipse中添加了Epson JavaPOS的lib文件夹中的Jar文件,并编写了一个连接到打印机的简单程序JavaPOS-Epson TM-T88IV-Eclipse中不满意的链接错误,eclipse,printing,unsatisfiedlinkerror,epson,javapos,Eclipse,Printing,Unsatisfiedlinkerror,Epson,Javapos,我买了一台爱普生TM-T88IV热敏打印机。我使用安装手册安装了Epson JavaPOS ADK 然后,我在Eclipse中添加了Epson JavaPOS的lib文件夹中的Jar文件,并编写了一个连接到打印机的简单程序 public class MainClass { public static void main(String[] args) { //System.out.println("Ausgabe aus der main()-Methode")
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)
线程“main”java.lang.UnsatifiedLinkError中出现异常:java.library.path中没有jp_co_epson_upos_firm_FirmNativeAccess_1_13_0001
位于java.lang.ClassLoader.loadLibrary(未知源)
位于java.lang.Runtime.loadLibrary0(未知源)
位于java.lang.System.loadLibrary(未知源)
在jp.co.epson.upos.core.v1_13_0001.pntr.CommonPrinterService.(CommonPrinterService.java:1004)
位于java.lang.Class.forName0(本机方法)
位于java.lang.Class.forName(未知源)
位于jp.co.epson.uposcommon.util.epsonjposerviceinstancefactory.createInstance(epsonjposerviceinstancefactory.java:142)
位于jpos.loader.simple.SimpleServiceConnection.connect(未知源)
在jpos.BaseJposControl.open(未知源代码)
在MainClass.main(MainClass.java:15)
可以打印带有“CheckHealth.bat”的内容
有人有办法解决这个问题吗
致意
梅恩泽尔曼森
- 我正在使用Windwos 8.1(64位)
- 热敏打印机通过USB连接
- EPSON JavaPOS ADK的版本是1.13.15
- 安装了Java JDK和JAI的最新32位Java版本
java.exe -Djava.library.path=c:\path\to\dlls\ -cp c:\my\class\path my.app.Main
编辑:
您需要指定的路径是存储dlljp_co\u epson\u upos\u firm\u FirmNativeAccess*.dll
的目录。Epson JavaPOS ADK的安装例程将这些文件存储到JRE的bin目录中,您在安装ADK时指定了该目录