Netbeans IDE allows you to run and debug your Nashorn scripts.
To run the latest version of Nashorn, we need to install JDK 1.8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
You can download Netbeans IDE 8.2 from
Choose the Java EE edition because it includes JavaScript.
Click File --> New Project..
Select Java Application and click Next.
Deselect Create Main Class and click Finish.
Add a new JavaScript file. Rightclick on Source Packages. Choose New --> Other.
Input a filename and click Finish.
Now we can create our first Nashorn script. This line of code should work.
print('Hello world');
Rightclick inside your file and click Run File.
Congratulations, You've just created your first Nashorn script!
To continue, there are two options:
- Learn more about Nashorn scripting
- Lean more about Nashorn scripts for SQLcl with Netbeans