Jump to content

java webstart - how to read xml from jar


Recommended Posts

By: ernest du plessis - linksar

java webstart - how to read xml from jar

2003-03-20 01:12

I read a xml file into my java application.With the following line:

 

JasperCompileManager.compileReportToFile("xmlfile.xml");

 

The problem is when the class file and xml is complied to a jar.The application can not find the xml file.

 

Is there another way to read this xml file when it is in a jar?

 

 

 

 

 

 

By: Suraj Amin - suraj_amin

RE: java webstart - how to read xml from jar

2003-03-20 04:27

Hi there,

 

You could use the following to complile:

JasperReport jasperReport = JasperCompileManager.compileReport( this.getClass().getResourceAsStream("xmlfile.xml"));

 

--

Regards,

Suraj Amin

 

Homepage: http://www.geocities.com/suraj_amin/

 

/* May the source be with you */

Link to comment
Share on other sites

  • 6 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...