-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript 无法引用非java core class #296
Comments
做了一些研究,发现是classloader的问题,javascript engine 缺省使用:thread context classloader。不可以访问applicaton class loader。参考:https://stackoverflow.com/questions/30225398/java-8-scriptengine-across-classloaders/30251930#30251930 我在我本地fix了这个问题,加一个class loader的选项。发一个PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
非常喜欢js的功能。不过有一个问题,就是在javascript里,只能访问core javaclass,比如:
var pi = Packages.java.lang.Math.PI
不过非java core class就访问不到了,
比如:
var pi = Packages.org.apache.commons.lang3.math. NumberUtils .BYTE_MINUS_ONE
我已经确认classload可以load这个class。从源码里,看不到block这些class,不知是什么原因?
不知是不是我的server的secruity manager的问题?
The text was updated successfully, but these errors were encountered: