Search notes:

jsc.exe

jsc.exe is a JScript .NET compiler that produces executables from JavaScript.
On my current installation of Windows, I found jsc.exe under the following locations:

Command line options

C:\> jsc [options] <source files> [[options] <source files> …]
/out:<file> Specify name of binary output file
/t[arget]:exe Create a console application (default)
/t[arget]:winexe Create a windows application (EXE)
/t[arget]:library Create a library assembly (DLL)
/platform:<platform> Limit which platforms this code can run on; must be x86, Itanium, x64, or any cpu, which is the default
/autoref[+|-] Automatically reference assemblies based on imported namespaces and fully-qualified names (on by default)
/lib:<path> Specify additional directories to search in for references
/r[eference]:<file list> Reference metadata from the specified assembly file <file list>: <assembly name>[;<assembly name>...]
/win32res:<file> Specifies Win32 resource file (.res)
/res[ource]:<info> Embeds the specified resource <info>: <filename>[,<name>[,public|private]]
/linkres[ource]:<info> Links the specified resource to this assembly <info>: <filename>[,<name>[,public|private]]
/debug[+|-] Emit debugging information
/fast[+|-] Disable language features to allow better code generation
/warnaserror[+|-] Treat warnings as errors
/w[arn]:<level> Set warning level (0-4)
@<filename> Read response file for more options
/?, /help Display help
/d[efine]:<symbols> Define conditional compilation symbol(s)
/nologo Do not display compiler copyright banner
/print[+|-] Provide print() function
/codepage:<id> Use the specified code page ID to open source files
/lcid:<id> Use the specified lcid for messages and default code page
/nostdlib[+|-] Do not import standard library (mscorlib.dll) and change autoref default to off
/utf8output[+|-] Emit compiler output in UTF-8 character encoding
/versionsafe[+|-] Specify default for members not marked 'override' or 'hide'

Simple example

Assuming that the following source file is named src.js, it can be compiled with jsc src.js and then executed with src.exe.
function add(a,b) {
   return a+b;
}
print(add(20, 22))

import statement

In order to use .NET types, the import statement is required:
import System;

print(System.Environment.CommandLine);

var args = System.Environment.GetCommandLineArgs();
for (var argNo in args) {
   print(args[argNo]);
}

No 'console' object

By default, there is no console object. Source code that contains something like console.log("…") will generate the error message error JS1135: Variable 'console' has not been declared.

Index