简体   繁体   中英

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. Have done the installation of javapos adk for Linux, set the /opt/EpsonJavaPos/bin to /root/.bash_profile, and of course java. Installed the tmt-cups driver as well and set up the printer using the PPD file. But after all these setups, I am getting the below error every time while trying to run my java code using eclipse. 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. Used SetupPOS to get the jpos.xml and dumped into the eclipse as well. Used check health test and getting the same below error as from eclipse while running my code-:

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. LD_LIBRARY_PATH=/opt/EpsonJavaPOS/bin:$LD_LIBRARY_PATH export LD_LIBRARY_PATH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM