Announcement

Collapse
No announcement yet.

JavaScript wiht own Class

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaScript wiht own Class

    hello,
    i built a simple class to test if mirth can handle extern classes.
    My class lies in mirth/lib/custom and i used the code that i found in the devboard:

    var extern=new Packages.com.bhi.MirthUtils.MirthLib(); // where mirthlib is my jar-package
    var result=extern.Ausgabe("Hallo");


    And i got this error during parsing messages:
    ECMAError :..MirthLib ...is not a function, it is org.mozilla.javascript.NativeJavaPackage.

    Or is it only possible to run JS?

    Thanks for your help

    Jörg

  • #2
    Re: JavaScript wiht own Class

    I believe you need to use the "importPackages" command to import Packages.com.bhi.MirthUtils

    Then you can do var extern = new MirthLib();

    Check the posting about calling external libs for the alternate way.

    -Chris
    Chris Lang

    Comment

    Working...
    X