Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

Classpath

Thread view: 
John Smith - 12 May 2006 08:49 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.