JSweet
JSweet converts Java programs into TypeScript and JavaScript for browsers, mobile Web views, or Node.js.
What JSweet 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, which the project describes as regular JavaScript that can work 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. The project lists support for over 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. Integrations include Eclipse, Maven, and Gradle plugins, with Angular, Cordova, Node.js, and Three.js among the examples. JSweet supports CommonJS, AMD, and UMD modules, and includes a mode for debugging Java code in a browser. Getting started requires Git, Node.js, and Maven, with Maven used to generate JavaScript from a quickstart project. The project presents JSweet for Java developers building web and mobile HTML5 applications with JavaScript libraries and frameworks. It is open source and free.
Good
- Free and open source.
- Generates type-checked JavaScript programs.
- Lists support for over 1,000 JavaScript libraries and plugins.
- Includes Eclipse, Maven, and Gradle plugins.
- Supports CommonJS, AMD, and UMD modules.
Watch out
- Getting started requires Git, Node.js, and Maven.
- The displayed README does not state the license name.
Who it suits
JSweet is aimed at Java developers building web or mobile HTML5 applications with JavaScript libraries and frameworks. It may also suit teams that want to use Java code with browser or Node.js targets.
Verdict
JSweet offers Java developers a route to JavaScript output and a broad listed library ecosystem. Its setup depends on Git, Node.js, and Maven.
Plans and prices
From JSweet's own pricing page, checked 9 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| JSweet | Free | Open-source Java-to-JavaScript transpiler |
The facts
Each one read from JSweet's own pages, with the date it was checked.
What it does
- Async support
- Async and await programming idioms are supported.checked 15 Oct 2026
- Build integrations
- Official tooling includes Eclipse, Maven and Gradle plugins.checked 15 Oct 2026
- Candies
- Java descriptions of JavaScript APIs are packaged as Maven artifacts called candies.checked 15 Oct 2026
- Candy generation
- A candy generator can create Java APIs from TypeScript definition files.checked 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.checked 15 Oct 2026
- Current Maven artifact
- Maven Central lists org.jsweet:jsweet-transpiler version 3.1.0.checked 15 Oct 2026
- Debugging
- A debug mode is provided for debugging Java code in a browser.checked 15 Oct 2026
- Dependency exposure
- MvnRepository flags multiple dependency vulnerabilities for the older 2.3.5 artifact, including Log4j and Commons IO issues.checked 15 Oct 2026
- Developer identity
- The Maven POM names Renaud Pawlak and Louis Grignon as project developers.checked 15 Oct 2026
- ECMAScript targets
- The compiler lists ES3 through ES6 as supported output targets.checked 15 Oct 2026
- Framework integrations
- Examples and bindings cover JQuery, Underscore, Angular, Backbone, Cordova, Node.js, Ionic, React and Three.js.checked 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.checked 9 Oct 2026
- Independent artifact licence
- MvnRepository records jsweet-transpiler 2.3.5 as Apache 2.0 licensed.checked 15 Oct 2026
- Independent ecosystem comparison
- LibHunt lists JSweet alongside alternatives such as GWT, J2CL, WebFX and Vaadin.checked 15 Oct 2026
- Installation requirements
- The quick-start workflow requires Git, Node.js, npm and Maven available on the command path.checked 15 Oct 2026
- Integrations
- The project lists Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations.checked 9 Oct 2026
- J4TS
- The J4TS candy provides basic Java APIs using a fork of GWT JRE emulation.checked 15 Oct 2026
- Java constructs
- The compiler supports constructs such as inner and anonymous classes, final fields, overloads, instanceof and static initializers.checked 15 Oct 2026
- JavaScript compatibility
- JSweet says generated code is regular JavaScript that can interoperate directly with JavaScript programs and libraries.checked 9 Oct 2026
- JavaScript interoperability
- Generated output is ordinary JavaScript intended to interoperate directly with JavaScript code and libraries.checked 15 Oct 2026
- Java semantics
- JSweet supplies implementations of core Java APIs to support shared server/client code and legacy Java migration.checked 15 Oct 2026
- Language features
- Its listed features include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6.checked 9 Oct 2026
- Library ecosystem
- The project advertises more than 1,000 JavaScript libraries, frameworks and plugins through JSweet bindings.checked 15 Oct 2026
Where it runs
- Language mapping
- Its syntax mapping covers Java classes, interfaces, functional types, unions, tuples, object types and string types.checked 15 Oct 2026
The full review of JSweet
JSweet is a Java-to-TypeScript and JavaScript transpiler for browser, mobile Web view, and Node.js projects. It is best for Java developers building HTML5 applications who want to use JavaScript libraries without switching their source language. Its compiler-based type checking and broad library support are strong reasons to consider it; the Git, Node.js, and Maven setup is a real prerequisite.
Overview
JSweet takes Java source code and produces JavaScript or TypeScript-oriented output for web and mobile applications. That makes it a focused bridge for teams with Java experience and a need to work with JavaScript frameworks, rather than a general-purpose JavaScript development tool.
Its central trade-off is clear: developers can keep Java in the workflow and target familiar JavaScript environments, but they must be comfortable with a transpilation step and the required toolchain. The quickstart uses Maven to generate JavaScript from a project, following setup with Git, Node.js, and Maven.
Key features
Typed transpilation and JavaScript interoperability
JSweet uses Oracle's Java compiler and Microsoft's TypeScript compiler to generate type-checked JavaScript programs. That compiler pairing is useful to Java developers who want checks during translation, though it does not change the fact that the output is intended to work in the JavaScript ecosystem.
The language mapping covers Java syntax and constructs, async/await, and ECMAScript targets from ES3 to ES6. Generated code is regular JavaScript and can interoperate directly with JavaScript programs and libraries, which helps when a project needs to combine translated code with existing JS components.
Libraries, integrations, and debugging
JSweet supports over 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. The breadth is particularly relevant to Java teams that need web ecosystem components; examples include Angular, Cordova, Node.js, and Three.js. Eclipse, Maven, and Gradle plugins connect the transpiler to common Java development and build workflows.
CommonJS, AMD, and UMD output modules give projects a choice of JavaScript module formats, and programs can run in browsers or Node.js. A debug mode supports debugging Java code in a browser, a practical link between the Java source and the web target.
Pricing
JSweet is open source and free. Its JSweet plan costs nothing and is described as 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 or seat, quota, or renewal terms to weigh in the stated pricing.
Platforms
JSweet is listed for Android, iOS, Linux, macOS, web, and Windows, as well as API use. Its generated programs are described as running in browsers or Node.js, and the broader platform listing makes it relevant across desktop and mobile development contexts.
Who it's for
Choose JSweet if your team knows Java and wants to build web or mobile HTML5 applications using JavaScript libraries and frameworks. The compiler-based checks, Maven-centered quickstart, and Java build-tool plugins suit Java-oriented workflows. It is a weaker fit if you do not want the Git, Node.js, and Maven setup or are looking for a tool centered on authoring JavaScript directly.
Pros and cons
- Pro: Compiler-based type checking provides a structured way to translate Java into JavaScript.
- Pro: Support for over 1,000 libraries and integrations with Eclipse, Maven, and Gradle helps connect Java projects to the JavaScript ecosystem.
- Pro: CommonJS, AMD, and UMD output and browser/Node.js targets accommodate different runtime and module needs.
- Con: Setup requires Git, Node.js, and Maven, adding prerequisites before the Maven quickstart can generate output.
- Con: Its purpose is specifically Java-to-web transpilation, so it is not the natural choice for developers who want to write JavaScript directly.
Alternatives
Browse Code Transpilers to compare tools across the category.
- SWC is a free, open-source Rust-based developer toolchain; choose it instead if that is the toolchain you need rather than Java-to-JavaScript transpilation.
- Transcrypt is free and open source under Apache 2.0; consider it as another open-source transpiler option.
- Babel is free, community funded, and has no paid tiers or stated usage limits; it is an alternative for a project that prefers Babel's tool.
- ClojureScript is free, open source under the Eclipse Public License 1.0; consider it if that is the language and license fit you need.
- Google Web Toolkit is free and Apache 2.0 licensed; it is another open-source option for web development.
- Kotlin/JS is a free Kotlin compiler target for JavaScript configured with the Kotlin Multiplatform Gradle plugin; choose it if Kotlin is the source language you want to use.
- Opal is free MIT-licensed software; consider it as another free transpiler option.
- Haxelib offers free libraries; choose it if your need is a library collection rather than JSweet's Java-to-JavaScript conversion.
Verdict
JSweet is a strong fit for Java developers who want to target browser, mobile Web view, or Node.js applications while using JavaScript libraries and retaining a Java-centered toolchain. Its type-checked output, broad library ecosystem, and free open-source plan make it compelling for that specific workflow. Look elsewhere if the required Git, Node.js, and Maven setup is unwelcome or your project does not call for Java-to-JavaScript transpilation.
Getting started
- Install Git, Node.js, and Maven.
- Generate JavaScript from the JSweet quickstart project with Maven.
- Use the available Eclipse, Maven, or Gradle plugin if it fits your workflow.
Questions
How much does JSweet cost?
JSweet is free. The listed plan is free.
Is JSweet open source?
Yes. It is described as open source.
Which platforms does JSweet support?
The listed platforms are Android, API, iOS, Linux, macOS, web, and Windows. Its generated programs can run in browsers or Node.js.
Which JavaScript module formats can it generate?
JSweet supports CommonJS, AMD, and UMD JavaScript modules.
Which integrations and plugins are listed?
Plugins are listed for Eclipse, Maven, and Gradle. Example integrations include Angular, Cordova, Node.js, and Three.js.
What is required to get started?
The setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project.
Alternatives to JSweet
- 1

SWC
Free planAndroidWebAPILinux7.1Free plan - 2
Transcrypt
Free planWebLinuxmacOSSelf-hosted6.7Free plan - 3
TypeScript Playground
Free planWeb6.6Free plan - 4
Google Web Toolkit
Free planWebExtensionLinuxmacOS6.5Free plan - 5
Haxelib
Free planAPILinuxmacOSWindows6.5Free plan - 6
js_of_ocaml
Free planWebAPILinux6.5Free plan