Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: java sdk - getting report definition outside of class path

  1. #1
    Join Date
    Aug 2015

    Default java sdk - getting report definition outside of class path

    I am trying to get the report definition from a folder that is outside the class path, but have so far been unsuccessful.

    The following successfully loads the definition from a folder contained in the class path, however I am unable to figure out how to get it from an absolute path outside the class path:

    // Parse the report file
    final URL reportDefinitionURL = classloader.getResource("some/path/inclass/Sample1.prpt");
    final ResourceManager resourceManager = new ResourceManager();
    final Resource directly = resourceManager.createDirectly(reportDefinitionURL, MasterReport.class);     
    return (MasterReport) directly.getResource();
    But how can I get the file definition based on a absolute path (linux) which is not located in the class path such as "/usr/share/pentaho/Sample1.prpt" ?

    Any help greatly appreciated !

  2. #2
    Join Date
    Mar 2003


    Use a instead of an URL object. It is as simple as that.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.