What is TeaVM?

TeaVM is an ahead-of-time translating compiler (transpiler) from Java bytecode to JavaScript. Its close relative is well-known GWT. The main difference is that TeaVM does not require to provide source code together with compiled class files. Moreover, source code is not required to be Java. For example, TeaVM successfully compiles Kotlin language and Scala.

Can I see TeaVM in action?

Sure, you can.

Why should I use TeaVM?

If you like to write on Java, and you want to write code that runs in the browser, you can use TeaVM. TeaVM provides you with all features necessary to develop applications for the browser:

How can I start to use TeaVM?

You can create a new TeaVM-flavoured Java web application, using a Maven archetype:

mvn -DarchetypeCatalog=local \
  -DarchetypeGroupId=org.teavm \
  -DarchetypeArtifactId=teavm-maven-webapp \
  -DarchetypeVersion=0.4.1 \

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

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

How can I learn more about TeaVM?

Please, look at the project's wiki on GitHub. It provides documentation about generally used parts of TeaVM.

If you are interested which parts of JDK you can use in TeaVM, read this automatically generated report.

There are also some javadocs:

Finally, you can browse the source code at GitHub. There are few examples that might help you to start using TeaVM.

Where to download TeaVM?

You don't need to download TeaVM, Maven does it for you. Just follow instruction above to create a new Maven project.

If you prefer Eclipse to create your projects, install TeaVM plugin from the TeaVM update site. If you want to debug your TeaVM applications, running in Google Chrome, install the TeaVM Chrome extension.

You can also clone the source code repository: https://github.com/konsoletyper/teavm.git.

Who uses TeaVM?

How to receive feedback?

If you have questions, ask them by email: info@teavm.org. You can also report an issue on GitHub repository and discuss TeaVM in TeaVM forum.

How can I help the project?

What's wrong with GWT?

You probably already use GWT to develop browser application in Java, but GWT has its own disadvantages: