4

I recently bought a Epson TM-T20 Printer and I am currently trying to build a java application that will utilize this. I have the included JavaPOS that came with the printer installed and its related .jar files added into my build path. With all this said, I keep getting this error when trying to run some of the sample examples that are packaged along with it.

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jp_co_epson_upos_firm_FirmNativeAccess_1_11_0001 in java.library.path

In case the rest of the trace stack helps

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_11_0001.pntr.CommonPrinterService.(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at jp.co.epson.uposcommon.creator.EpsonJposServiceInstanceFactory.createInstance(Unknown Source) at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source) at jpos.BaseJposControl.open(Unknown Source) at Step1Frame.processWindowEvent(Step1Frame.java:79) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

OTHER INFORMATION

  • OS: W7 x64
  • IDE: Eclipse Juno Service Release 1 x64
  • Have the latest JDK installed
  • JavaPOS has a application called setupPOS. I have also added my printer in this setup

Any help would be greatly appreciated. Thank you

Shellz
  • 51
  • 2
  • 5
  • Found a similar, yet unanswered question [here](http://stackoverflow.com/questions/7470057/java-pos-health-check-problem). – Bruno Flávio Oct 10 '12 at 09:04
  • This happens when your epson-javapos setup isn't correct. You need to check the option that lib files are copied to the jvms /ext folder. Look here: http://stackoverflow.com/questions/30839049/how-can-i-use-javapos-to-print-reciepts-with-an-epson-printer/30839050#30839050 – thi gg Jun 15 '15 at 07:14

1 Answers1

2

According to the java documentation the UnsatisfiedLinkError exception is:

Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.

According to another question in SO that you can read here the problem might be in your library path. Try to include the option

-Djava.library.path=./XXX

Where ./XXX would be the relative or full path to where your printer driver may be stored (the directory where jp_co_epson_upos_firm_FirmNativeAccess_1_11_0001.dll or .so is located).

Good luck!

Community
  • 1
  • 1
Bruno Flávio
  • 778
  • 10
  • 27
  • The odd thing is that .dll or .so is no where to be found on my machine. I'm seriously at wits end as to how to get this all going and I've followed the manual down to the T. In theory, the samples should all be able to link and compile without any problems. I'll continue to research it and if I find a solution I'll post it on here. – Shellz Oct 11 '12 at 07:04
  • 1
    Perhaps it could be a class name then. I was reading [here](http://support.bluefishretail.com/entries/208209-install-a-printer-epson-tm-on-windows-jpos) and they mention that there is the need to copy 2 jars into the java libs directory. The samples are not presented with their source? If you compile them yourself you'd probably get better error info. – Bruno Flávio Oct 11 '12 at 13:24