Skip to content
Java to Closure JavaScript transpiler
Branch: master
Clone or download
rluble and Copybara-Service Refactor frontend code and move to the frontend package.
PiperOrigin-RevId: 245803288
Latest commit 0ba552f Apr 29, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates to ask for Bazel version Mar 11, 2019
build_defs Add multiple browser support for j2cl_test and gen_j2cl_tests macro. Apr 26, 2019
docs Update supported Bazel version to 0.24 Apr 24, 2019
jre Stop referring to static class method of Throwable as a free function. Apr 23, 2019
junit
samples/helloworld Use 'local' in .bazelrc instead of 'standalone' spawn strategy. Apr 6, 2019
third_party Add a hidden flag for serializing libraryinfo in an human readable fo… Dec 19, 2018
tools Move Jdt specific code to frontend/jdt. Apr 26, 2019
transpiler Refactor frontend code and move to the frontend package. Apr 29, 2019
.bazelrc Use 'local' in .bazelrc instead of 'standalone' spawn strategy. Apr 6, 2019
.bazelversion Update supported Bazel version to 0.24 Apr 24, 2019
.gitignore Ignore bazel build directories Feb 6, 2019
.travis.yml Introduce .bazelversion file and update tooling to use that. Apr 24, 2019
BUILD introduce //:jsinterop-annotations-j2cl so other project can refer to… Nov 15, 2018
CONTRIBUTING.md Small change in Contributing.md Mar 23, 2019
LICENSE Replace LICENSE files with the complete text of the Apache 2 license. Jun 20, 2017
README.md Overhaul the getting started documentation for J2CL Apr 10, 2019
WORKSPACE Add a starlark function for loading third_party bazel repo needed for… Nov 13, 2018
bazel_build_test.sh create a bazel_build.sh script that can be shared between CI server. Mar 1, 2019

README.md

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.

  • Get the best out of Java and JavaScript. You no longer need to choose between the two or lock into a specific framework or a language. Choose the right language at the right place and hire the best talent for the job.

  • Get it correct the first time. The robust run-time type checking based on the strong Java type system combined with the advanced cross language type checks catches your mistakes early on.

  • Provides massive code reuse. J2CL closely follows the Java language semantics. This reduces surprises, enables reuse across different platforms and brings most popular Java libraries into your toolkit including Guava, Dagger and AutoValue.

  • Modern, fresh and blazing fast. Powered by Bazel, J2CL provides a fast and modern development experience that will make you smile and keep you productive.

  • Road tested and trusted. J2CL is the underlying technology of the most advanced GSuite apps developed by Google including GMail, Inbox, Docs, Slides and Calendar.

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 and breaking changes will most likely be introduced.

We are actively working on adapting more pieces including Junit4 emulation and faster pruning for an even better development experience.

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.

You can’t perform that action at this time.