daust / JasperReportsIntegration

JasperReportsIntegration provides an interface to use the JasperReports reporting engine in an Oracle database application, specifically with Oracle Application Express (Oracle APEX).
BSD 3-Clause "New" or "Revised" License
56 stars 25 forks source link

Extending the classpath - dynamic loading of external libraries and classes #31

Closed daust closed 2 years ago

daust commented 4 years ago

I think it would be helpful to have an additional external directory from which the application could load additional jar files to enhance the reports. Then you wouldn't have to put them into the war file itself. Should also make upgrades easier in the future.

Not sure whether I can implement this, but building a class loader should be possible.

daust commented 4 years ago

suggestions for naming this additional directory:

... or something similar which makes it obvious that they are loaded at runtime by the J2EE application. It is an extension of the classpath.

daust commented 3 years ago

https://stackoverflow.com/questions/60764/how-to-load-jar-files-dynamically-at-runtime/59743937#59743937

daust commented 2 years ago

Extending the class path at runtime is more difficult than anticipated.

We already have established ways of dealing with that:

  1. When running the .war file we can see the actual class path on the webpage. Simply put the additional jars somewhere in those directories.
  2. You can also put the additional libs into the expanded /webapps/jri/WEB-INF/lib directory
  3. You can modify the jri.war permanently by unpacking, adding lib, packing the .war file
  4. You can simply build your own version of the integration by building with gradle yourself and put the addional libs into the directory lib/additional-war-libraries. They will be added by the build process automatically.

image