Fork of TeaVM for compiling the EaglercraftX 1.8 WASM GC runtime, and any clients built on it
Go to file
2015-03-01 16:58:23 +01:00
teavm-chrome-rdp Fix Chrome RDP backend 2015-02-14 17:18:40 +04:00
teavm-classlib Add some JDK classes needed to support DukeScript 2015-03-01 11:25:42 +03:00
teavm-cli First working version with new diagnostics API 2015-01-14 19:12:06 +04:00
teavm-core Fix https://github.com/konsoletyper/teavm/issues/74 2015-03-01 12:55:28 +03:00
teavm-dom Added responseType and response properties to XMLHTTPRequest. 2015-02-18 15:48:03 -08:00
teavm-eclipse Fix little bug in $rt_rootInvocationAdapter 2015-02-09 00:00:53 +04:00
teavm-html4j Refactoring. Add AsyncCallback support 2015-02-07 18:36:18 +04:00
teavm-jso https://github.com/konsoletyper/teavm/issues/51 2015-03-01 12:07:39 +03:00
teavm-maven Add post-processor that reports references to missing items and replaces 2015-01-16 17:47:25 +04:00
teavm-platform Repair Class.getEnumConstants() 2015-02-26 23:28:01 +03:00
teavm-samples Switching to stable version of Bck2Brwsr VM 2015-02-28 17:28:53 +01:00
teavm-tests Replace OutputStreamWriter and DataOutputStream 2015-02-26 19:12:53 +04:00
.gitignore Adds root /target directory to .gitignore 2014-03-20 10:59:22 +04:00
checkstyle.xml Replace old code samples with new ones 2014-10-05 15:45:44 +04:00
LICENSE Applies apache license 2013-12-20 12:45:28 +04:00
license-regexp.txt Refactoring and bugfixes 2014-08-30 23:29:24 +04:00
NOTICE Applies apache license 2013-12-20 12:45:28 +04:00
pom.xml Merge branch 'master' of https://github.com/konsoletyper/teavm 2015-02-27 08:46:20 +01:00
README.md Update README.md 2014-11-22 10:48:33 +03:00

TeaVM

What is TeaVM?

TeaVM is an ahead-of-time translator from Java bytecode to JavaScript. It can be compared with GWT, however TeaVM does not require source code of your application and all required libraries. You can use TeaVM for building applications for the browser, due to the following features:

  • per-method dependency analyzer, that determines a set of methods that are really needed to run your application, so TeaVM won't translate whole JAR files;
  • fast JavaScript; for now it is almost as fast as the JavaScript, generated by GWT;
  • Java class library emulation;
  • integration with Maven and Eclipse;
  • generation of source maps;
  • debugger;
  • interoperation with JavaScript libraries together with the set of predefined browser interfaces.

Quick start

There are several options of using TeaVM. One is the Maven build. The easiest way to create a new TeaVM project is to type in the command line:

mvn -DarchetypeCatalog=local \
  -DarchetypeGroupId=org.teavm \
  -DarchetypeArtifactId=teavm-maven-webapp \
  -DarchetypeVersion=0.2.1 archetype:generate

Now you can execute mvn clean package and get the generated war file. Deploy this war in Tomcat or another container, or simply unzip it and open the index.html page.

It is much easier to develop TeaVM applications using Eclipse. If you prefer Eclipse, please read this tutorial.

To learn TeaVM deeper, you take a look at the teavm-samples module, containing examples of TeaVM-based projects. Also you can read project's wiki.

DukeScript

DukeScript is a set of APIs that allows Java applications easily talk to JavaScript environment to (usually) animate an HTML page. While DukeScript has its own implementation of JVM, called Bck2Brwsr, TeaVM also provides support for running DukeScript applications, using teavm-html4j plugin.

Live examples

Compare the speed of JavaScript produced by TeaVM and GWT here: http://teavm.org/live-examples/jbox2d-benchmark/

Play Geobot, a little physics-based puzzle game. Thanks to joan789 for her great artwork!

Thanks to Jaroslav Tulach, author of DukeScript, we have several DukeScript example applications. One is the minesweeper game. You can try its TeaVM-compiled version here, and then take a look at source code and HTML page.

Another example is avaialble here. It uses GraphHopper to build route in browser. Unlike original GraphHopper example it works completely in browser instead of querying server. Thanks to Peter Karich.

Feedback

Ask your questions by email: info@teavm.org. Also you can report issues on a project's issue tracker.