Hi,
The engine that's used by ThingWorx JavaScript service is Rhino, it supports calling java directly as following :
. However , the similar usage doesn't work in ThingWorx JavaScript Service :
How to make it work in JavaScript service ?
Regards,
Sean
Hello @seanccc,
Have you tried using with output string :
var pi = Math.PI;
result = Math.PI;
Hope it helps,
Thank, you . var pi = Math.PI; works, but I got the same error when doing further testing :
============Rhino debugger=============
============ThingWorx============
Regards,
Sean
Java primitive and classes are not exposed in ThingWorx Script Services.
You can create Java entities and services using the ThingWorx Extension SDK.
Regards.
Do you know the reason why the java primitive classes are not exposed ? it bring lots of convenience for development.
Regards,
Sean