Skip to main content
1-Visitor
August 31, 2015
Question

PTC integrity : How can I import my Java packages into a js file

  • August 31, 2015
  • 1 reply
  • 2292 views

I have my custom java packages, I have to import these packages in js file which is located at integrity server. How can i do these.

Regards,

Ketan

    1 reply

    Rocko
    19-Tanzanite
    September 9, 2015

    You need to place the jar on the server into the subdirectory \data\java\jars.

    Restart the server. This will load the jar. Make sure it is compiled with the same java version the server is running with.

    In serverside javascript trigger script, you can use the classes with "Packages" prefix, or you import it:

    importClass(Packages.mks.util.MessageCatalog);

    importClass(Packages.java.util.UUID);

    16-Pearl
    September 23, 2015

    Hello Ketan,

    Did Roman's answer resolve this issue for you?  If so, could you mark the answer correct by clicking on the25153012_3loy.pngon his post?  This lets people browsing threads to supply answers (or to find them) know that this question was answered, and it also recognizes Roman's contribution.

    If it didn't help you, please let us know how this answer is lacking, and we can try to address the additional concerns you raise.

    Thanks,

    Kael