Skip to content
SPECIFICTION
Get listed

JSweet

jsweet.org

Free plan Open source WebWindowsmacOSLinuxiOSAndroid
Visit jsweet.org
Spec score 8.7 #1 of 28 in Code Transpilers

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 alongside Microsoft's TypeScript compiler to generate type-checked JavaScript. The project describes the output as regular JavaScript that can work directly with JavaScript programs and libraries. Listed language features include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6. JSweet lists support for more than 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. It provides Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations. Generated programs can use CommonJS, AMD, or UMD modules and run in browsers or Node.js. A debug mode supports debugging Java code in a browser. Setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project. JSweet is open source and free, and is presented for Java developers building web and mobile HTML5 applications with JavaScript libraries and frameworks.

Spec sheet

What it does
JSweet transpiles Java source into TypeScript and JavaScript for browser, mobile-webview and Node.js applications.Read 15 Oct 2026 · github.com
Integrations
The project lists Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations.Read 9 Oct 2026 · github.com
License
The repository links to a license file but the opened page does not state the license name in its displayed README text.Read 9 Oct 2026 · github.com
Async support
Async and await programming idioms are supported.Read 15 Oct 2026 · github.com
Build integrations
Official tooling includes Eclipse, Maven and Gradle plugins.Read 15 Oct 2026 · github.com
Candies
Java descriptions of JavaScript APIs are packaged as Maven artifacts called candies.Read 15 Oct 2026 · github.com
Candy generation
A candy generator can create Java APIs from TypeScript definition files.Read 15 Oct 2026 · github.com
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.Read 15 Oct 2026 · github.com
Current Maven artifact
Maven Central lists org.jsweet:jsweet-transpiler version 3.1.0.Read 15 Oct 2026 · central.sonatype.com
Debugging
A debug mode is provided for debugging Java code in a browser.Read 15 Oct 2026 · github.com
Dependency exposure
MvnRepository flags multiple dependency vulnerabilities for the older 2.3.5 artifact, including Log4j and Commons IO issues.Read 15 Oct 2026 · mvnrepository.com
Developer identity
The Maven POM names Renaud Pawlak and Louis Grignon as project developers.Read 15 Oct 2026 · central.sonatype.com
ECMAScript targets
The compiler lists ES3 through ES6 as supported output targets.Read 15 Oct 2026 · github.com
Framework integrations
Examples and bindings cover JQuery, Underscore, Angular, Backbone, Cordova, Node.js, Ionic, React and Three.js.Read 15 Oct 2026 · github.com
Getting started
The project’s setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project.Read 9 Oct 2026 · github.com
Independent artifact licence
MvnRepository records jsweet-transpiler 2.3.5 as Apache 2.0 licensed.Read 15 Oct 2026 · mvnrepository.com
Independent ecosystem comparison
LibHunt lists JSweet alongside alternatives such as GWT, J2CL, WebFX and Vaadin.Read 15 Oct 2026 · libhunt.com
Installation requirements
The quick-start workflow requires Git, Node.js, npm and Maven available on the command path.Read 15 Oct 2026 · github.com
J4TS
The J4TS candy provides basic Java APIs using a fork of GWT JRE emulation.Read 15 Oct 2026 · github.com
Java constructs
The compiler supports constructs such as inner and anonymous classes, final fields, overloads, instanceof and static initializers.Read 15 Oct 2026 · github.com
Java semantics
JSweet supplies implementations of core Java APIs to support shared server/client code and legacy Java migration.Read 15 Oct 2026 · github.com
JavaScript compatibility
JSweet says generated code is regular JavaScript that can interoperate directly with JavaScript programs and libraries.Read 9 Oct 2026 · github.com
JavaScript interoperability
Generated output is ordinary JavaScript intended to interoperate directly with JavaScript code and libraries.Read 15 Oct 2026 · github.com
Language features
Its listed features include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6.Read 9 Oct 2026 · github.com
Language mapping
Its syntax mapping covers Java classes, interfaces, functional types, unions, tuples, object types and string types.Read 15 Oct 2026 · github.com
Library ecosystem
The project advertises more than 1,000 JavaScript libraries, frameworks and plugins through JSweet bindings.Read 15 Oct 2026 · github.com
License structure
The repository states that the transpiler and candy generator use GPLv3, core and J4TS use Apache 2, and documentation uses CC-BY-SA.Read 15 Oct 2026 · github.com
Limit: incomplete Java library coverage
The same discussion says JSweet was not intended to port all Java libraries and describes AWT/Swing support as partly proof-of-concept.Read 15 Oct 2026 · libhunt.com
Limit: Java-version compatibility
Open issues request Java 16 support and report compiler problems tied to Java compiler internals.Read 15 Oct 2026 · github.com
Limit: Maven build dependencies
An open issue reports that not all dependencies required to build JSweet are available on Maven Central.Read 15 Oct 2026 · github.com
Limit: repository availability
The issue tracker contains an open report titled “Repository down,” opened September 11, 2024.Read 15 Oct 2026 · github.com
Limit: sandbox connectivity
A user issue reports that the online sandbox needs an internet connection to compile and asks for an offline workflow.Read 15 Oct 2026 · github.com
Maven Java requirement
The published 3.1.0 POM configures Java release 11.Read 15 Oct 2026 · central.sonatype.com
Modules
Generated programs support CommonJS, AMD and UMD module formats.Read 15 Oct 2026 · github.com
Output modules
JSweet supports CommonJS, AMD, and UMD JavaScript modules, and says programs can run in browsers or Node.js.Read 9 Oct 2026 · github.com
Praise: JavaScript ecosystem
A Reddit discussion indexed by LibHunt says JSweet has better JavaScript ecosystem integration and some library ports than GWT.Read 15 Oct 2026 · libhunt.com
Project activity
GitHub shows the public repository with about 1.5k stars, 161 forks and 1,807 commits.Read 15 Oct 2026 · github.com
Release history
LibHunt's changelog record identifies version 3.1.0 as released April 22, 2021 and describes it as optimisation and stabilisation.Read 15 Oct 2026 · java.libhunt.com
Self-hosting
The transpiler is distributed as source and Maven artifacts, allowing local project builds rather than requiring a hosted service.Read 15 Oct 2026 · central.sonatype.com
Type checking
The tool uses Oracle javac and Microsoft TypeScript to type-check generated programs.Read 15 Oct 2026 · github.com
Who it is for
JSweet is presented for Java developers building web and mobile HTML5 applications with JavaScript libraries and frameworks.Read 9 Oct 2026 · github.com

Plans and prices

JSweet Free Open-source Java-to-JavaScript transpiler Read 9 Oct 2026 · github.com

Every JSweet plan and price →

Strong points and limits

Strong points

  • Transpiles Java into TypeScript and JavaScript
  • Generates type-checked JavaScript
  • Lists support for over 1,000 JavaScript libraries
  • Offers Eclipse, Maven, and Gradle plugins
  • Includes browser debugging for Java code

Limits

  • Setup calls for Git, Node.js, and Maven
  • Project page does not state the license name

Who it suits

JSweet suits Java developers building web or mobile HTML5 applications that use JavaScript libraries and frameworks. It may also suit teams that want to generate JavaScript from Java source.

JSweet in depth

Read the full write-up

Overview

JSweet is a Java-to-TypeScript and JavaScript transpiler for teams building web or mobile HTML5 applications. It suits Java developers who want to keep Java as their source language while using JavaScript libraries; its compiler-based checks and Maven, Gradle, and Eclipse integrations are compelling, provided the required toolchain fits the team.

The trade-off is a dedicated transpilation workflow: setup requires Git, Node.js, and Maven, and the quickstart uses Maven to generate JavaScript from a project. That is a sensible bridge for Java-led teams, but a poor fit for developers who want to write JavaScript directly or avoid another build step.

Key features

Java source, checked output

JSweet maps Java syntax and constructs to TypeScript and JavaScript, and supports async/await with ECMAScript targets from ES3 through ES6. It uses Oracle's Java compiler alongside Microsoft's TypeScript compiler to generate type-checked JavaScript programs. That gives Java teams checks across the translation workflow, while the range of output targets helps accommodate different JavaScript environments.

The resulting code is regular JavaScript and can interoperate directly with JavaScript programs and libraries. CommonJS, AMD, and UMD module formats are supported, and programs can run in browsers or Node.js. This makes JSweet practical for projects that need to connect Java-authored code to existing JavaScript systems.

Libraries and workflow

JSweet supports more than 1,000 JavaScript libraries, frameworks, and plugins, distributed as Maven artifacts called candies. Eclipse, Maven, and Gradle plugins bring it into established Java workflows; Angular, Cordova, Node.js, and Three.js are among its example integrations. The breadth is useful for teams adopting JavaScript tooling without abandoning Java, although the project still requires developers to work through its Java-to-JavaScript layer.

A browser debug mode lets developers debug Java code in the browser. For teams tracing behavior across generated output, that connects source-level work to the environment where the application runs.

Pricing

JSweet is free and open source. The JSweet plan costs nothing and includes the Java-to-JavaScript transpiler. There are no paid plan tiers described; this is a strong fit for teams seeking a no-cost transpilation tool, with the Git, Node.js, and Maven setup as the practical commitment.

Platforms

JSweet is listed for Android, iOS, Linux, macOS, web, and Windows, and also supports API use. Its generated programs can run in browsers or Node.js. The target platforms make it relevant to web and mobile HTML5 work, while the output-module choices support common JavaScript project structures.

Who it's for

JSweet is aimed at Java developers building web and mobile HTML5 applications with JavaScript libraries and frameworks. It is especially suitable for teams that want Java syntax and compiler checks in their source workflow, but still need output that works with JavaScript code and tools. Teams that prefer a direct JavaScript or TypeScript authoring workflow should look elsewhere.

Pros and cons

Compiler-based type checking: Oracle's Java compiler and Microsoft's TypeScript compiler are used to generate type-checked JavaScript programs, giving Java teams checks during transpilation.

Broad JavaScript library support: More than 1,000 libraries, frameworks, and plugins are supported through Maven-packaged candies.

Flexible integration: CommonJS, AMD, and UMD output, browser and Node.js execution, and Eclipse, Maven, and Gradle plugins suit varied JavaScript and Java build workflows.

Specific setup requirements: Git, Node.js, and Maven are required, so teams without that toolchain face extra setup before generating output.

Translation layer: Developers work in Java and transpile to JavaScript; those seeking to author directly in JavaScript or TypeScript may find this workflow ill-suited.

Alternatives

Pick Kotlin/JS if Kotlin is the source language you want to compile to JavaScript and you use the Kotlin Multiplatform Gradle plugin. Google Web Toolkit is another free, open-source option for teams comparing Java-oriented web tooling. Choose ClojureScript when its Clojure-to-JavaScript approach and self-hosted platform fit your project. Scala.js fits teams seeking a Scala-to-JavaScript compiler managed through a Scala build tool.

SWC, Transcrypt, and Babel are also free alternatives; compare their stated platforms and project terms with JSweet's Java-focused workflow. Cython is a free alternative for Linux, macOS, and Windows. Browse Code Transpilers for more options.

Verdict

Choose JSweet if your team is Java-led, wants to build HTML5 applications with JavaScript libraries, and values compiler-based checks and integration with Java build tools. Its free, open-source model and broad library support make that workflow a credible option; look elsewhere if you want to avoid the Git, Node.js, and Maven setup or prefer to write JavaScript directly.

Verdict

JSweet provides a Java-to-JavaScript workflow with compiler-based type checking and integrations with common build tools. Its setup requires Git, Node.js, and Maven.

Where Specifiction places it

Alternatives to JSweetAll alternatives →