This document is the API and re-compilation specification for JScripter(JS) Emulation 1.0.

JS Emulation Library is written in pure Java language on the top of JS Standard Library and fully complies with the JS Standard API & Re-compilation Specification.

In other words, JS Emulation Library perfectly extends JS Standard Library, except that it is not for end use but for re-compilation. It emulates the key features of Java language for JavaScript environment. JS re-compilers are encouraged to include this library in their process.

As an important part of JS Libraries, this library actually determines which Java standard classes can be used in a well-complied JS application. Using a Java standard class without emulated in this library will definitely cause re-compilation errors.

The current release of this library has emulated most Java standard classes and interfaces of the java.lang package. Of course it does not emulate all the methods of the classes. I expect to emulate the whole java.util package in the near future. Some Java packages like never comes into this library, obviously it is simply because JavaScript language does not do local I/O's at all.