Java applet can't find JavaPOS configuration files

折月煮酒 提交于 2019-12-06 11:48:10

This is for the reference of anyone facing a similar problem.

I couldn't get the JavaPOS code to see the jpos.properties file, but loading the values into System properties as described above works, so I'll stick with that for now.

To have JavaPOS load jpos.xml or jposxml.cfg from a URL, you need to set the property jpos.config.populatorFileURL and not jpos.config.populatorFile. This can be set either in jpos.properties, or failing that, as a System property.

Faced same problem.

JposServiceLoader uses classpath to look for the root of path.

For example, if local classpath for application is

C:/myapp/target/classes

then jpos.properties should be by path

C:/myapp/target/classes/jpos/res/jpos.properties

P.S. Maybe it is not a best way to place jpos files, but at least it is something you can start with solving this issue.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!