Bug report: can't call static methods on a Java class instance
tibetty
xihua.duan at gmail.com
Wed Oct 30 07:38:32 UTC 2019
I used your method, but it stills failed calling a static method of a 3rd
party class (com.alibaba.fastjson.JSONObject):
Nashorn (JS) code:
var jso = Java.type('com.alibaba.fastjson.JSONObject').parseObject(json);
Error Message:
Exception in thread "main" javax.script.ScriptException: TypeError:
Java.type("com.alibaba.fastjson.JSONObject").parseObject is not a function
in <eval> at line number 1
How to overcome this kind of problem?
--
Sent from: http://nashorn.36665.n7.nabble.com/
More information about the nashorn-dev
mailing list