cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

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

kmehta
1-Newbie

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

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

2 REPLIES 2
Rocko
17-Peridot
(To:kmehta)

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);

KaelLizak
14-Alexandrite
(To:Rocko)

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


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Top Tags