You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/antora/modules/ROOT/pages/scripting.adoc
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -298,11 +298,10 @@ The JSR223 engine implementation for JavaScript, removed from Java by itself, ha
298
298
See more information about enabling JavaScript support in GraalVM and what https://www.graalvm.org/latest/reference-manual/js/[configuration options] can be propagated via script variables.
299
299
In particular, an `org.graalvm.polyglot:js` dependency has to be added to the target project to support JavaScript.
300
300
301
-
302
301
Starting with version 6.4, the Python scripts support has been migrated to GraalVM Polyglot as well.
303
302
Now these scripts can be written in Python 3.x and can use third-party libraries.
304
303
See https://www.graalvm.org/latest/reference-manual/python/[GraalPy] documentation for more information.
305
-
In particular, an `rg.graalvm.polyglot:python` dependency has to be added to the target project to support JavaScript.
304
+
In particular, an `rg.graalvm.polyglot:python` dependency has to be added to the target project to support Python.
306
305
307
306
By default, the framework sets `allowAllAccess` to `true` on the shared Polyglot `Context` which enables this interaction with host JVM:
308
307
@@ -315,4 +314,7 @@ By default, the framework sets `allowAllAccess` to `true` on the shared Polyglot
315
314
* The creation and use of new sub-processes.
316
315
* The access to process environment variables.
317
316
318
-
This can be customized via overloaded `PolyglotScriptExecutor` constructor which accepts a `org.graalvm.polyglot.Context.Builder`.
317
+
This can be customized via overloaded `PolyglotScriptExecutor` constructor which accepts a `org.graalvm.polyglot.Context.Builder`.
318
+
For example, the Jython-based scripts still can be executed with an `option("python.EmulateJython", "true")`.
319
+
However, it is recommended to migrate to GraalPy altogether for better interpretation performance.
320
+
Therefore, `import` for Java classes does not work anymore, instead `import java` has to be used and its `java.type()` function, respectively.
0 commit comments