users@jaxb.java.net

Re: jaxb.properties and bgm.ser files in a jar

From: Bill Chmura <Bill_at_Explosivo.com>
Date: Thu, 09 Jan 2003 00:11:31 -0500

I finally got it working by following the tip in here about making a new
loader class

(In JAR file even)

http://forum.java.sun.com/thread.jsp?forum=34&thread=320813


-----Original Message-----
From: Discussion list for the Java Architecture for XML Binding
[mailto:JAXB-INTEREST_at_JAVA.SUN.COM] On Behalf Of Brett Porter
Sent: Thursday, January 02, 2003 4:16 PM
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: Re: jaxb.properties and bgm.ser files in a jar


I have successfully used the method of specifying the class loader to
get them from a JAR in WEB-INF/lib from a web application, and from the
command line when running test cases. I'm not sure what your scenario
is, but it seems strange that this wouldn't work. If you look at the
source in JAXB (jaxb-api-src.zip I believe) for this portion, it is
quite simple (this lead me on to specifying the class loader to resolve
the same problem).

Cheers,
Brett

Marek Malowidzki wrote:
> you said you used:
<snip>
> Nonetheless, the workarounbd I am using with success is to place both
> bgm.ser and jaxb.properties files in a plain directory (or, to be more

> precide, in a directory tree that corresponds to the package name),
> somewhere in a classpath. Someone suggested here that this approach
> with ClassLoader was used with success to refer to these files when
> they are in a jar. I could not get this behavior and would like to
> explain a possible cause. Has anyone tried it with success?
>
> Best regards in 03,
>
> Marek