Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

JSweet examples

A set of simple examples to show what can be done in Java with the JSweet transpiler.

All these example are written in Java using the JSweet APIs (candies)] They are then transpiled to JavaScript by the JSweet transpiler.

  • Simple canvas drawing (canvasdrawing): demonstrates the use of HTML5 canvas. browse
  • Simple HTML form control (inputcontrol): demonstrates the use of HTML5 forms and inputs. browse
  • Simple jQuery (jquery): demonstrates the use of JQuery with JSweet. browse
  • Simple Angular (angularjs): demonstrates the use of Angular with JSweet. browse
  • Simple Knockout (knockoutjs): demonstrates the use of Knockout with JSweet. browse
  • Ray tracer (raytracer): draws a 3D scene, adapted from the TypeScript example page. browse
  • Todos (todomvc): demonstrates the use of Backbone and Underscore with JSweet, adapted from the TypeScript example page. browse
  • Blocks game (blocksgame): demonstrates how to write an HTML5 mobile game with JSweet. browse
  • Promises (promises): demonstrates the use of the latest EcmaScript6 Promise API. browse

Visit the live JSweet's example page ( to browse the examples, run them and debug the Java code within your favorite browser. Note that all these examples are responsive and should work as well on a Web browser and on a mobile.

Visit also for some examples using the Threejs framework (WebGL-powered 3D)]


> git clone
> cd jsweet-examples

Build with Gradle

./gradlew jsweetClean jsweet (--refresh-dependencies) (--info)

Build with Maven

mvn clean generate-sources

Build with Ant


Run in your favorite browser

> firefox webapp/${example-name}/index.html


The node and npm executables must be in the path (] Install Maven (]


A set of simple examples to show what can be done with the JSweet transpiler (Java to JavaScript)




No packages published