[英]Epson JavaPOS ADK for linux gives error while using with eclipse and java code
I have an Epson TM-T88V printer and want to print a receipt with my own java code using eclipse.我有一台 Epson TM-T88V 打印机,想用我自己的 java 代码使用 eclipse 打印收据。 Have done the installation of javapos adk for Linux, set the /opt/EpsonJavaPos/bin to /root/.bash_profile, and of course java.已经为 Linux 安装了 javapos adk,将 /opt/EpsonJavaPos/bin 设置为 /root/.bash_profile,当然还有 java。 Installed the tmt-cups driver as well and set up the printer using the PPD file.还安装了 tmt-cups 驱动程序并使用 PPD 文件设置打印机。 But after all these setups, I am getting the below error every time while trying to run my java code using eclipse.但是在所有这些设置之后,每次尝试使用 eclipse 运行我的 java 代码时,我都会遇到以下错误。 All the required javapos jars are present in jre/lib/ext folder and even set the native JNI library from /opt/EpsonJavaPos/bin to my java code using eclipse.所有必需的 javapos jars 都存在于 jre/lib/ext 文件夹中,甚至使用 Z6B7B655DD22FAA3F10677C5124 将 /opt/EpsonJavaPos/bin 中的本机 JNI 库设置为我的 java 代码。 Used SetupPOS to get the jpos.xml and dumped into the eclipse as well.使用 SetupPOS 获取 jpos.xml 并转储到 eclipse 中。 Used check health test and getting the same below error as from eclipse while running my code-:在运行我的代码时,使用了检查运行状况测试并得到与 eclipse 相同的以下错误:
jpos.JposException: Failed to load the JNI.
at jp.co.epson.upos.T88V.pntr.T88VService.initializeUsingCommand(Unknown Source)
at jp.co.epson.upos.core.v1_13_0001.pntr.CommonPrinterService.open(Unknown Source)
at jpos.BaseJposControl.open(Unknown Source)
at Step1Frame.processWindowEvent(Step1Frame.java:81)
at java.awt.Window.processEvent(Window.java:2009)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
I am stuck here for a long time and have no clue.我被困在这里很长一段时间,没有任何线索。 Any help will be very appreciated.任何帮助将不胜感激。
Finally error gone after adding the following lines to ~/.profile and ~/.bashrc.将以下行添加到 ~/.profile 和 ~/.bashrc 后,错误终于消失了。 LD_LIBRARY_PATH=/opt/EpsonJavaPOS/bin:$LD_LIBRARY_PATH export LD_LIBRARY_PATH LD_LIBRARY_PATH=/opt/EpsonJavaPOS/bin:$LD_LIBRARY_PATH 导出 LD_LIBRARY_PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.