- Home
- Code Transpilers
- JSweet
JSweet
What it is
JSweet converts Java programs into TypeScript and JavaScript for browsers, mobile Web views, or Node.js. It uses Oracle’s Java compiler and Microsoft’s TypeScript compiler to generate type-checked JavaScript. The project describes that output as regular JavaScript that can interoperate directly with JavaScript programs and libraries. Listed language capabilities include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6. JSweet supports over 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. It lists Eclipse, Maven, and Gradle plugins, and integrations such as Angular, Cordova, Node.js, and Three.js. Output modules include CommonJS, AMD, and UMD, and a debug mode supports debugging Java code in a browser. Getting started calls for Git, Node.js, and Maven, with Maven used to generate JavaScript from a quickstart project. JSweet is presented for Java developers building web and mobile HTML5 applications with JavaScript libraries and frameworks. It is open source and free.
For and against
For
- Generates type-checked JavaScript from Java programs.
- Supports over 1,000 JavaScript libraries and frameworks.
- Provides Eclipse, Maven, and Gradle plugins.
- Includes browser debugging for Java code.
Against
- Getting started requires Git, Node.js, and Maven.
- The project page does not state the license name.
The verdict
JSweet provides a free, open-source route from Java source to JavaScript and TypeScript, with a broad listed library ecosystem. Developers should be prepared to use the stated Git, Node.js, and Maven setup.
Who it suits
JSweet is for Java developers building web or mobile HTML5 applications that use JavaScript libraries and frameworks. It may fit teams that want to work in Java while producing JavaScript for browsers or Node.js.
Plans and prices
JSweet
Open-source Java-to-JavaScript transpiler
Read 9 Oct 2026 · github.com
On the record
- Async support
- Async and await programming idioms are supported.github.com · read 15 Oct 2026
- Build integrations
- Official tooling includes Eclipse, Maven and Gradle plugins.github.com · read 15 Oct 2026
- Candies
- Java descriptions of JavaScript APIs are packaged as Maven artifacts called candies.github.com · read 15 Oct 2026
- Candy generation
- A candy generator can create Java APIs from TypeScript definition files.github.com · read 15 Oct 2026
- Commercial use
- The project says applications built with JSweet may be closed-source and commercial, while embedding the GPL transpiler itself may require a commercial licence discussion.github.com · read 15 Oct 2026
- Current Maven artifact
- Maven Central lists org.jsweet:jsweet-transpiler version 3.1.0.central.sonatype.com · read 15 Oct 2026
- Debugging
- A debug mode is provided for debugging Java code in a browser.github.com · read 15 Oct 2026
- Dependency exposure
- MvnRepository flags multiple dependency vulnerabilities for the older 2.3.5 artifact, including Log4j and Commons IO issues.mvnrepository.com · read 15 Oct 2026
- Developer identity
- The Maven POM names Renaud Pawlak and Louis Grignon as project developers.central.sonatype.com · read 15 Oct 2026
- ECMAScript targets
- The compiler lists ES3 through ES6 as supported output targets.github.com · read 15 Oct 2026
- Framework integrations
- Examples and bindings cover JQuery, Underscore, Angular, Backbone, Cordova, Node.js, Ionic, React and Three.js.github.com · read 15 Oct 2026
- Getting started
- The project’s setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project.github.com · read 9 Oct 2026
- Independent artifact licence
- MvnRepository records jsweet-transpiler 2.3.5 as Apache 2.0 licensed.mvnrepository.com · read 15 Oct 2026
- Independent ecosystem comparison
- LibHunt lists JSweet alongside alternatives such as GWT, J2CL, WebFX and Vaadin.libhunt.com · read 15 Oct 2026
- Installation requirements
- The quick-start workflow requires Git, Node.js, npm and Maven available on the command path.github.com · read 15 Oct 2026
- Integrations
- The project lists Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations.github.com · read 9 Oct 2026
- J4TS
- The J4TS candy provides basic Java APIs using a fork of GWT JRE emulation.github.com · read 15 Oct 2026
- Java constructs
- The compiler supports constructs such as inner and anonymous classes, final fields, overloads, instanceof and static initializers.github.com · read 15 Oct 2026
The review
Overview
JSweet is a source-to-source transpiler that turns Java programs into TypeScript and JavaScript for browsers, mobile Web views, and Node.js. It suits Java developers building HTML5 applications who want to work with JavaScript libraries without changing their source language. Its appeal is the combination of compiler-based type checking and a wide library ecosystem; the required Git, Node.js, and Maven setup is a meaningful commitment.
Key features
Java-to-web translation
JSweet maps Java syntax and constructs to TypeScript and JavaScript, including async/await, and supports ECMAScript targets from ES3 through ES6. It uses Oracle's Java compiler alongside Microsoft's TypeScript compiler to generate type-checked JavaScript programs. That pairing gives Java-oriented teams a structured route into web output, although the workflow still depends on transpilation rather than direct JavaScript authoring.
JavaScript ecosystem and output
The generated code is regular JavaScript and can interoperate directly with JavaScript programs and libraries. JSweet supports CommonJS, AMD, and UMD modules, with programs able to run in browsers or Node.js. This makes it relevant to projects with different module conventions, while its stated compatibility range gives teams choices among older and newer ECMAScript targets.
JSweet's ecosystem includes support for more than 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. Eclipse, Maven, and Gradle plugins connect it to common Java development workflows; Angular, Cordova, Node.js, and Three.js are among its example integrations. A debug mode for Java code in a browser is another practical fit for teams tracing behavior across the translation boundary.
Setup
The quickstart requires Git, Node.js, and Maven, then uses Maven to generate JavaScript from a starter project. That path is suited to developers already comfortable with a Java build environment; it is a less direct option for someone seeking a browser-only editor or a toolchain-free conversion step.
Pricing
JSweet is free and open source. Its JSweet plan costs nothing and describes an open-source Java-to-JavaScript transpiler. The plan includes syntax-version conversion, intermediate output, CLI access, and source-to-source conversion. There are no paid tiers to weigh against a free-plan cap in the stated offering.
Platforms
JSweet lists Android, API, iOS, Linux, macOS, web, and Windows. Its output targets browsers, mobile Web views, and Node.js, so the platform breadth is most useful to developers building HTML5 applications across web and mobile contexts rather than those seeking native-app conversion.
Who it's for
Choose JSweet if your team knows Java, wants to build web or mobile HTML5 applications, and needs to use JavaScript libraries or frameworks while keeping Java as the source language. Its integrations and Maven-packaged library bindings make it particularly relevant to Java projects that already use Maven, Gradle, or Eclipse. Look elsewhere if your priority is to author JavaScript directly or avoid a Git, Node.js, and Maven setup.
Pros and cons
- Pro: Compiler-based type checking supports a more structured Java-to-JavaScript translation workflow.
- Pro: More than 1,000 supported JavaScript libraries, frameworks, and plugins broaden the options for Java teams entering web development.
- Pro: CommonJS, AMD, and UMD output plus browser and Node.js support suit projects with differing runtime and module needs.
- Con: Getting started requires Git, Node.js, and Maven, adding setup work for developers without that toolchain.
- Con: Its focus is Java source transpilation, so it is not the natural choice for teams that want a JavaScript-first workflow.
Alternatives
Code Transpilers is the broader category to browse when you want to compare tools beyond Java-to-JavaScript conversion.
- J2ObjC is a free, open-source option for iOS, Linux, and macOS, with a requirement for a Mac workstation running macOS 15 or higher, Xcode 16 or higher, and JDK 21 or higher.
- SWC is a free, open-source Rust-based developer toolchain with Android, API, Linux, macOS, web, and Windows platforms.
- Brython is another free option, with Android, iOS, self-hosted, and web platforms.
- js_of_ocaml is free, with API, Linux, and web platforms.
- Skulpt is a free option for web.
- Transcrypt is free and open source under the Apache 2.0 license, with Linux, macOS, self-hosted, web, and Windows platforms.
- TypeScript Playground is a free, browser-based choice focused on a single text document.
- Babel is a free, community-funded option with API, Linux, macOS, web, and Windows platforms.
Verdict
JSweet is a strong fit for Java developers building HTML5 applications who want type-checked Java-to-JavaScript output and a broad route into JavaScript libraries. Its free, open-source offering lowers the cost of trying that approach, but the Git, Node.js, and Maven prerequisites are the main reason to look elsewhere if you want a lighter or JavaScript-first workflow.