google / j2cl

Java to Closure JavaScript transpiler
Apache License 2.0
1.22k stars 143 forks source link
compiler gwt j2cl java javascript transpiler wasm wasmgc

J2CL · Build Status

Seamless Java in JavaScript applications that tightly optimizes with Closure Compiler


J2CL is a powerful, simple and lightweight transpiler from Java to Closure style JavaScript.

Guides

Get Support

Caveat Emptor

J2CL is production ready and actively used by many of Google's products, but the process of adapting workflows and tooling for the open-source version is not yet finalized.

Wasm support is fully working but should be considered as work-in-progress since the related parts of the spec is not finalized yet. We are working closely with W3C and V8 team to finalize it and make it available in all browsers.

You can see what we are working on here.

Last, the workflow is not yet supported in Windows. You can contribute to make this a reality. Coordinate and follow the progress of this effort here. For developers that want to use Windows as their platform we recommend installing under WSL (Windows Subsystem for Linux).

Stay tuned!

J2CL vs. GWT?

In early 2015, Google GWT team made a difficult but necessary decision to work on a new alternative product to enable Java for the Web.

It was mostly due to changing trends in the web ecosystem and our new internal customers who were looking at Java on the Web not as an isolated ecosystem but an integral part of their larger stack. It required a completely new vision to create tools from the ground up, that are tightly integrated with the rest of the ecosystem. A modern architecture, that is reliable, fast and provides a quick iteration cycle.

There was no practical way to achieve those goals completely incrementally out of GWT. We started from scratch using everything we learned from working on GWT over the years. In the meantime, we kept GWT steering committee members in the loop and gave contributors very early access so they could decide to build the next version of GWT on J2CL.

The strategy has now evolved GWT3 to an SDK focused on libraries and enterprise tooling which was one of the strongest points of GWT all along.

We think that such separation of concerns is crucial part of the success of the both projects and will provide the best results for the open source community.

Contributing

Read how to contribute to J2CL.

Licensing

Please refer to the license file.

Disclaimers

J2CL is not an official Google product and is currently in 'alpha' release for developer preview.