Despite this, being able to access Java objects within OO scriplets is quite handy. In fact an OO developer – who shall remain unnamed – described it as the only thing that stopped him going ‘royally insane’ in the clicky clicky world of OO.
Below is an example of fetching the time from the Java Date library and setting it as the scriplet’s output.
var d = new java.util.Date();
var time = d.getTime();
scriptletResult = time;