3

I am attempting to setup JavaPOS on a Linux machine and am not having any success. I have installed:

rxtx
  *.so -> JAVA_HOME/jre/lib/amd64
  *.jar -> JAVA_HOME/jre/lib/ext
com api
  comm.jar -> JAVA_HOME/jre/lib/ext
  javax.comm.properties JAVA_HOME/lib

When I attempt to load the device, I am getting a JPos Exception "Service does not exist".

Arne Burmeister
  • 20,046
  • 8
  • 53
  • 94
Walter
  • 1,290
  • 2
  • 21
  • 46
  • are you succeeded with your problem, because i'm having the same problem, will you be able to assist me. –  Dec 28 '13 at 07:17

1 Answers1

3

I guess the jpos.xml file is not being loaded.

Try loading the file manually using the code below:

System.setProperty("jpos.config.populatorFile", path_to_jpos_xml);
System.setProperty("jpos.loader.serviceManagerClass","jpos.loader.simple.SimpleServiceManager");
System.setProperty("jpos.config.regPopulatorClass", "jpos.config.simple.xml.XercesRegPopulator");

JposServiceManager manager = JposServiceLoader.getManager();
manager.getEntryRegistry().load();
SKodama
  • 31
  • 2