I have some XML schemas which I pass to Xerces XML parser. I have stored
those XML schemas in d:\myworkplace\myproject\schemas\client\ folder. There
are 4 schemas. One main schema include other 3 schemas. It all works fine
when I run my code from my Eclise 3.1.2/JDK50/WinXP, but it doesn't work at
my coworker which have the same configuration. The same code expects those 3
imported schemas to be in project root folder (d:\myworkplace\myproject\).
In my code, I'm referencing those imported schemas only by its file name on
the disk (e.g. schema1.xsd), without path (e.g.
d:\myworkplace\myproject\schemas\client\schema1.xsd) and on my PC there are
no problems. I think that this problem is not related to Xerces XML parser,
because there are similar problems with some other configuration files which
are referenced only by its file name, without path. What should I do?
jmcgill - 12 May 2006 09:30 GMT
>What should I do?
Put them in a jar, and ensure that jar is on the classpath, and then
load them as a resource instead of going straight loading via file io.
Look into "getResource()" and "getResourceAsStream()"
John Smith - 12 May 2006 09:42 GMT
Thank you for your response.
> Put them in a jar, and ensure that jar is on the classpath, and then load
> them as a resource instead of going straight loading via file io.
>
> Look into "getResource()" and "getResourceAsStream()"
No, I can't use this. I'm passing only path/filename (of the main schema) to
the Xerces and other projects.