ST-JS is a Java-to-JavaScript transpiler that outputs readable, recognizable code. It lets you write code that uses the JavaScript and DOM APIs using Java's syntax and tooling.
ST-JS helps you manage the complexity of large dynamic single-page web applications by combining the strong, static typing of Java, with the wealth of existing libraries of JavaScript.
Example source code (Java)
StockData stockData = new StockData() { {
last = 10.0;
close = 2.0;
stock = "ABC";
} };
$(that.row(stockData)).appendTo("table tbody");
that.stocks.push(stockData.stock);
Example generated code (JavaScript)
var stockData = {
last : 10.0,
close : 2.0,
stock : "ABC"
};
$(that.row(stockData)).appendTo("table tbody");
that.stocks.push(stockData.stock);