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();
精彩评论