title: Retrieve resource from jasperserver repository using server java api
body: <p>I'm trying to retrieve resource from Jasperserver repository using its java API, according to  <a href="https://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v55/repository-api" rel="nofollow">jasper report server ultimate guide</a>, I should get an instance of the ExecutionContext interface:</p>
  
  <pre><code>ExecutionContext context = JasperServerUtil.getExecutionContext();
  </code></pre>
  
  <p>then, get an instance of the RepositoryService interface:</p>
  
  <pre><code>RepositoryService repositoryService = ...; //how??
  </code></pre>
  
  <p>Now I can get the file using the following code:</p>
  
  <pre><code>FileResourceData fileResourceData = repositoryService.getContentResourceData(context, "/examples/report.pdf");
  </code></pre>
  
  <p>my question is how can I get the RepositoryService instance? </p>