开发者

How to setup JavaPOS on Linux?

开发者 https://www.devze.com 2023-03-28 17:20 出处:网络
I am attempting to setup JavaPOS on a Linux machine and am not having any success.I have installed: rxtx

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 doe开发者_如何学Pythons not exist".


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();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号