I'm developing an Applet that print a bar code using Jpos API. I need some jars and two configuration file. I've added jars to the classpath and configuration files in src directory. In Eclipse everything works fine.
Everything works fine in Eclispe but I can't find property files when i call the applet from a web page. So I've checked the JavaPos sources and I've paste the loadJposProperties() and xmlReg.load("wincor.jpos17.THxxx.xml") content in my source code:
The same method is used to found wincor.jpos17.THxxx.xml. So when I call applet form the browser I get INPUT STREAM FROM PROPERTIES OK!! from (1) and jpos/res/jpos.properties not found from (2).
So getClass().getClassLoader().getResourceAsStream works if i write it directly in my code, but doesn't work if i call a jar method.
I am really at a loss for what to try next in the debugging chain. Thanks
Yes, by "directly" i mean whe i call (1).
By "if i call a jar method" i mean call "prop.loadJposProperties()". Prop is a DefaultProperties object imported from an external jar. I've added alle xternal jar declarations to the jnlp file.
Have you checked the Java console to see if any exceptions are being thrown?
BTW I suspect code 1 is not the complete equivalent of code 2. Code 1 just gets an input stream whereas code 2 almost certainly gets the input stream, reads it and creates some sort of property object. It may be one of the later stages of process 2 is failing for example due to a lack of read permissions.