[jboss-user] [EJB 3.0] - Re: jrxml-file in a EJB3-archive

ColinEberhardt do-not-reply at jboss.com
Fri Mar 16 12:33:27 EDT 2007


Hi,

You cannot simply construct a File from a given pathnam ein order to load a file which is packaged within a jar file.

Take a look at this page on accessing resources:

http://java.sun.com/j2se/1.4.2/docs/guide/resources/resources.html

You should try:

URL url = Classloader.getResource( "report.jrxml" );

Regards,
Colin E.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028862#4028862

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028862



More information about the jboss-user mailing list