Guest User

Untitled

a guest
Jan 17th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. jasperDesign.setScriptletClass("Scriptlet");
  2.  
  3. File root = new File("/home/am/Desktop");
  4.  
  5. Class<?> cls = null;
  6. try {
  7. URLClassLoader classLoader = URLClassLoader.newInstance(
  8. new URL[] { root.toURI().toURL() },
  9. GenerateReport.class.getClassLoader());
  10. cls = Class.forName("Scriptlet", true, classLoader);
  11. } catch (ClassNotFoundException e) {
  12. // TODO Auto-generated catch block
  13. e.printStackTrace();
  14. } catch (MalformedURLException e) {
  15. // TODO Auto-generated catch block
  16. e.printStackTrace();
  17. }
Add Comment
Please, Sign In to add comment