activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: Classpath within application
Date Wed, 05 Apr 2006 21:31:57 GMT
Hi Roger,

If your class was loaded, then your files are in the classpath. 
Otherwise, your class would not have even loaded up.

Try using my.package.MyApp.class.getResource("/MyFile.xml");  Also run
a jar -tvf on the jar that contains the MyApp.class to make sure that
the MyFile.xml is really in there.

Regards,
Hiram

On 4/5/06, rbrush <roger.w.brush@boeing.com> wrote:
>
> I've been tasked to incorporate an application to work with activemq.  Using:
>
> <bean id="myApp" class="my.package.MyApp" init-method="start"/>
>
> starts the application, but the application uses
> class.getResource("/MyFile.xml") and fails.
> The application does not appear to be getting the same classpath used to
> start activemq.
>
> System.out.println("Classpath = " + System.getProperty ("java.class.path"));
>
> returns just --> Classpath = C:\activemq-4.0-M4\bin\../bin/run.jar
>
> Is there any way to ensure that the bean gets the classpath used to start
> the activemq server?
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Classpath-within-application-t1401888.html#a3772382
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Mime
View raw message