Creating Executable Javascript Scripts in Unix - Java Scripting

Java examples for Scripting:Run Script

Introduction

Use jjs in the JDK folded to run Javascript file

#! /usr/bin/env jjs
print('I am an executable');
var threeyr = 365 * 3;
print("The number of days in three years is ${threeyr}");

Related Tutorials