Jump to content

Read resource file from within jar without using the classloader approach


Li Gang

Recommended Posts

It seems that most stackoverflow solutions suggest to locate a static resource file from a jar file using classfolder or inputstream approach. In my case, the third party code needs to access the static resource file using a conventional path (jasperPath in the code below).

JasperPrint print = JasperFillManager.fillReport(jasperPath, paramMap, con);

Do I have to treat the static resource file as an external file (i.e., a file outside the jar file)?

Many thanks in advance.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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