Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Run Jar example

  1. #1
    Join Date
    Oct 2016

    Post Run Jar example

    Hello Pentaho community,

    There are a couple of posts on the forum regarding te execution of Jar (Java) files.
    However, there are none that provide a minimalistic, complete, and reproducible .zip example which simply:

    -Passes a String to the Jar from Kettle.
    -Receives a String back to Kettle from the Jar.
    -Provides the source code that compiles into the Jar, so a decompiler is not needed.

    If anyone can provide a .zip that suffices, I think it would be helpful for the entire Java-Pentaho community to get started.

  2. #2
    Join Date
    Aug 2016


    If you want to execute a standalone java program, you could use the script step (OS dependent).

    But what you want is a tutorial for accessing a java library in User Defined Java Class step? Would be good with an example yes. However it is quite easy to do:

    1) Write java could with a simple method (could make it static), taking a String as input, modifying it in some way, and returning it.
    2) Compile code to .jar
    3) Drop jar file in lib folder (could also use extlib with additional configurations in a property file)
    4) Create User Defined Java Class step, add import <package name>, then access the class and method as you would anywhere else.

    Unfortunately, the best tutorial documentation of the User Defined Java Class is currently down It can be accessed with web archive (or similar) like this:

    Founs some information here also:
    Last edited by Sparkles; 11-09-2018 at 06:51 AM.

Tags for this Thread

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.