Master Your Scripting Skills with the New Tutorial!
Enhanced scripting tutorial has just become part of Apache NetBeans documentation. It contains various examples showing how to communicate from Java with JavaScript, Python and other languages. The following topics are covered:
- Setup
- Get started
- Guest language "Hello World!"
- It's a polyglot world
- Add a language
- Hello World in Python and JavaScript
- Cast Array to List
- Call guest language functions from Java
- Call multiple guest language functions with shared state from Java
- Access guest language classes from Java
- Access guest language data structures from Java
- Access Java from guest languages
While the primary use-case for this enhanced scripting API is to simplify usage of scripting languages in NetBeans based applications, the API itself is standalone and can be used outside of NetBeans in any project. We are working on making it available in the Maven central repository.
Read more in the online tutorial.