Skip to content
abego edited this page Jun 28, 2017 · 5 revisions

Compiler Options

j2s.abandoned.resources.list

Values: a comma separated list of pathes

Automatically generated by the compiler.

j2s.compiler.abbreviation

Values: true/false

It controls generating Clazz.defineMethod or $_M.

j2s.compiler.abbreviation.prefix

Values: a String (default $_)

It controls generating Clazz.defineMethod or $_M.

(j2s.compiler.abbreviation must be true)

j2s.compiler.interface.casting

Values: enable/disable
Since: 4.5

If interface casting is disabled (by default), #castObjectAs won't be generated for #methodA(instanceA) invocation for #methodA(InterfaceA) and #methodA(InterfaceB) definitions, as in most cases instanceA won't be instance of InterfaceB and #castObjectAs is unnecessary

j2s.compiler.linebreak

Values: aString

Experimental feature to control the layout of the generated *.js files. May not work.

(See also j2s.compiler.whitespace)

j2s.compiler.method.overloading

Values: enable/disable
Since: 4.5

If method overloading is enabled(by default), #castObjectAs will be generated, else it won't be generated.

j2s.compiler.mode

Values: debug/release

When set to release the compiler generates "compressed" codes with variables starting "a", "b", "c", ..., much harder to read or debug.

j2s.output.path

Values: path to the directory containing the *.class files

The Java2Script compiler will generate the *.js files next the *.class files.

j2s.compiler.status

Values: enable/disable

When enabled the Java2Script compiler will generate ".js" files next to the ".class" files.

j2s.compiler.whitespace

Values: false|otherString

Experimental feature to control the layout of the generated *.js files. May not work.

(See also j2s.compiler.linebreak)

j2s.resources.list

Values: a comma separated list of pathes

Automatically generated by the compiler.

Clone this wiki locally