groovy script imports classes from other folders fails

Tagged: , , , ,

This topic has 0 replies, 1 voice, and was last updated 3 years, 9 months ago by Javilete.

  • Author
    Posts
  • #21527
     Javilete
    Participant

    I have a groovy script that triggers correctly in OpenIdm but this script uses instances of classes from other folders. When the script runs it throws an exception saying it can not find the imports at the top of the script.
    An example would be the following:

    /myScript.groovy
    import com.MyClass

    MyClass mc = new MyClass()
    mc.sayHello()

    /com/MyClass.groovy

    class MyClass {

    sayHello() {
    return “Hello”
    }
    }

    If I add the code of MyClass.groovy file in the myScript.groovy it runs without errors.

    Why is not finding it in the path?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?