I do that and nothing...

-----------
Message: 8 
Date: Sat, 12 May 2001 06:55:02 -0700 (PDT) 
From: Nikhil Patil <[EMAIL PROTECTED]> 
Subject: Re: [JBoss-user] How to read a file as a Resource 
To: [EMAIL PROTECTED] 
Reply-To: [EMAIL PROTECTED] 

Hi 
Start the resource name with / assuming that the 
directory above that / is in your classpath. 
--- "Pedro_E._G�mez" <[EMAIL PROTECTED]> wrote: 
> What i am tryin to do is to read a XML file that is 
> in the CLASSPATH. 
> I have a XML file in my classpath and I need to read 
> it. That is a resources for me. 
> 
> This file has some information that i need. 
> 
> 
>  The code is: 
> 
>          Object o = new Object(); 
> 
>          System.out.println("O is:" + o); 
> 
>          Class c = o.getClass(); 
> 
>          System.out.println("Class is:" + c); 
> 
>          InputStream in = 
> c.getResourceAsStream(resource); 
> 
>          System.out.println("Resource is:" + in); 
> 
>          And the in is null. But i am sure that it 
> is in the classpath. Becouse i have some classes in 
> the same directory and it can be read. 
> 
> 
> 
> ______________________________________ 
> Message sent with Misiva 
> Visit us at www.pragma.com.co/misiva 
> 
> _______________________________________________ 
> JBoss-user mailing list 
> [EMAIL PROTECTED] 
> 
http://lists.sourceforge.net/lists/listinfo/jboss-user 
> 
> 



______________________________________
Message sent with Misiva
Visit us at http://www.pragma.com.co/misiva

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to