Jump to content

JRXML inside JAR file


rolandc85

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I dont load JRXML from jars but JASPER files. It should be easy enough to do like that:

 

JasperReport report = (JasperReport) JRLoader.loadObject(this.getClass().getResource(filename));

 

Where "this" is a class inside a JAR boostrapping the report and filename is something like "com/foo/bar/bla.jasper" This makes the same classloader loading the resource which also loaded the "this" class inside the JAR. Then you can be sure that the classloader can actually handle JARs.



Post Edited by loge at 06/15/2009 09:10
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...