![]() When calling Java methods, a value conversion might be required. GraalVM JavaScript might internally use additional Java data types for performance reasons (e.g., the int type). JavaScript is defined to operate on the double number type. Java methods can be called like JavaScript functions: var file = new (Java.type('java.io.File'))("test.md") Static fields of a Java class, or fields of a Java object, can be accessed like JavaScript properties: var JavaPI = Java.type('').PI Java objects can be constructed with JavaScript’s new keyword: var FileClass = Java.type('java.io.File') The js.java-package-globals flag can be used to deactivate the global fields of Java packages (set false to avoid creation of the fields default is true).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |