JSweet
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 produce type-checked JavaScript, which the project describes as able to interoperate 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 offers Eclipse, Maven, and Gradle plugins, with Angular, Cordova, Node.js, and Three.js among its example integrations. The generated code can use CommonJS, AMD, or UMD modules. A debug mode lets developers debug Java code in a browser. Getting started requires 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 costs nothing.
Who it suits
JSweet suits Java developers building web or mobile HTML5 applications that use JavaScript libraries and frameworks. It also fits projects that need Java source converted into JavaScript for browsers or Node.js.
What it does well
- Generates type-checked JavaScript
- Supports over 1,000 JavaScript libraries and plugins
- Plugins available for Eclipse, Maven, and Gradle
- Browser debugging mode for Java code
What to know first
- Getting started requires Git, Node.js, and Maven
- Focused on Java-to-TypeScript and JavaScript conversion
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| JSweet | Open-source Java-to-JavaScript transpiler | Free |
As jsweet.org lists them, read 9 Oct 2026. The maker's own page has the final word.
Getting started
- Install Git, Node.js, and Maven.
- Use Maven to generate JavaScript from a quickstart project.
- Choose a supported target such as a browser, mobile Web view, or Node.js.
JSweet gives Java teams a way to target browser, mobile Web view, and Node.js projects without changing their source language. It is a focused fit for Java developers building HTML5 applications with JavaScript libraries, not a general-purpose JavaScript toolchain.
Overview
JSweet transpiles Java programs to TypeScript and JavaScript. Its appeal is keeping Java in the development workflow while producing code for JavaScript environments; the trade-off is a dedicated conversion step and a setup that requires Git, Node.js, and Maven.
Key features
Typed conversion and JavaScript output
JSweet uses Oracle's Java compiler and Microsoft's TypeScript compiler to generate type-checked JavaScript programs. It maps Java syntax and constructs, supports async/await, and targets ECMAScript from ES3 through ES6. That combination gives Java developers a typed route into web output, though the target range is specifically defined by those versions.
The generated code is regular JavaScript and can interoperate directly with JavaScript programs and libraries. CommonJS, AMD, and UMD module output, plus browser and Node.js runtime support, make it suitable for projects using different module conventions.
Libraries and workflow
The project supports 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 workflows; Angular, Cordova, Node.js, and Three.js are named integrations. Browser debug mode lets developers debug Java code, a practical aid when tracing behavior across the conversion boundary.
The quickstart generates JavaScript from a Maven project, but first requires Git, Node.js, and Maven. That prerequisite stack is manageable for Java development teams already using these tools, and a meaningful hurdle for anyone seeking a lightweight, standalone converter.
Pricing
JSweet is open source and free. The JSweet plan costs nothing and includes an open-source Java-to-JavaScript transpiler, syntax-version conversion, intermediate output, CLI access, and source-to-source conversion. There are no paid tiers or usage caps stated for this plan.
Platforms
JSweet is listed for Android, iOS, Linux, macOS, web, and Windows, as well as API use. Its output targets browsers, mobile Web views, and Node.js.
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. Its Maven-based workflow and library packaging are especially relevant to Java projects. Look elsewhere if your priority is avoiding Java source conversion or the Git, Node.js, and Maven setup.
Pros and cons
Pros
- Type-checked JavaScript generation using Java and TypeScript compilers gives Java developers checks during conversion.
- Support for more than 1,000 JavaScript libraries, with Maven-packaged candies, broadens the libraries Java projects can use.
- CommonJS, AMD, and UMD output, plus Eclipse, Maven, and Gradle plugins, accommodate established Java and JavaScript workflows.
- Free, open-source access includes CLI and intermediate output, with no stated usage cap.
Cons
- Setup requires Git, Node.js, and Maven, adding prerequisites before the quickstart can generate output.
- Its purpose is specifically Java-to-TypeScript and JavaScript conversion, so it is not aimed at developers seeking a general JavaScript toolchain.
- The ECMAScript targets named are ES3 through ES6, which may be limiting for projects requiring targets beyond that range.
Alternatives
Browse code transpilers for a wider set of conversion tools. Consider SWC as another free, open-source developer toolchain. Transcrypt is another free, open-source option, licensed under Apache 2.0. Babel is free, community funded, and has no paid tiers or usage limits stated. ClojureScript is a free option under the Eclipse Public License 1.0. Google Web Toolkit is another free, Apache 2.0-licensed choice. Kotlin/JS is a Kotlin compiler target for JavaScript configured with the Kotlin Multiplatform Gradle plugin. Opal is free MIT-licensed software. Scala.js compiles Scala to JavaScript and is managed through a Scala build tool.
Verdict
Java developers building HTML5 applications should choose JSweet when they want to keep Java as their source language while using JavaScript libraries and runtimes. Its type-checked output and Maven-centered ecosystem are compelling advantages at no cost; developers unwilling to take on the conversion workflow and its required toolchain should choose another approach.
Verdict
JSweet gives Java developers a route to JavaScript output while working with JavaScript libraries and tools. Its setup requires several development tools, and its focus is specifically source conversion from Java.
Questions
Is JSweet free?
Yes. The listed JSweet plan costs nothing, and the project is open source.
What does JSweet convert?
It transpiles Java programs to TypeScript and JavaScript for browsers, mobile Web views, or Node.js.
Which platforms does it support?
The listed platforms are Android, API, iOS, Linux, macOS, web, and Windows.
Which JavaScript libraries can I use?
The project lists support for over 1,000 libraries, frameworks, and plugins, packaged as Maven artifacts called candies.
Which tools and integrations are listed?
JSweet lists Eclipse, Maven, and Gradle plugins, as well as Angular, Cordova, Node.js, and Three.js integrations.
How do I get started?
The setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project.
Facts from JSweet's own pages
- Async support
- Async and await programming idioms are supported. · github.com, 15 Oct 2026
- Build integrations
- Official tooling includes Eclipse, Maven and Gradle plugins. · github.com, 15 Oct 2026
- Candies
- Java descriptions of JavaScript APIs are packaged as Maven artifacts called candies. · github.com, 15 Oct 2026
- Candy generation
- A candy generator can create Java APIs from TypeScript definition files. · github.com, 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, 15 Oct 2026
- Current Maven artifact
- Maven Central lists org.jsweet:jsweet-transpiler version 3.1.0. · central.sonatype.com, 15 Oct 2026
- Debugging
- A debug mode is provided for debugging Java code in a browser. · github.com, 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, 15 Oct 2026
- Developer identity
- The Maven POM names Renaud Pawlak and Louis Grignon as project developers. · central.sonatype.com, 15 Oct 2026
- ECMAScript targets
- The compiler lists ES3 through ES6 as supported output targets. · github.com, 15 Oct 2026
- Framework integrations
- Examples and bindings cover JQuery, Underscore, Angular, Backbone, Cordova, Node.js, Ionic, React and Three.js. · github.com, 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, 9 Oct 2026
- Independent artifact licence
- MvnRepository records jsweet-transpiler 2.3.5 as Apache 2.0 licensed. · mvnrepository.com, 15 Oct 2026
- Independent ecosystem comparison
- LibHunt lists JSweet alongside alternatives such as GWT, J2CL, WebFX and Vaadin. · libhunt.com, 15 Oct 2026
- Installation requirements
- The quick-start workflow requires Git, Node.js, npm and Maven available on the command path. · github.com, 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, 9 Oct 2026
- J4TS
- The J4TS candy provides basic Java APIs using a fork of GWT JRE emulation. · github.com, 15 Oct 2026
- Java constructs
- The compiler supports constructs such as inner and anonymous classes, final fields, overloads, instanceof and static initializers. · github.com, 15 Oct 2026
- JavaScript compatibility
- JSweet says generated code is regular JavaScript that can interoperate directly with JavaScript programs and libraries. · github.com, 9 Oct 2026
- JavaScript interoperability
- Generated output is ordinary JavaScript intended to interoperate directly with JavaScript code and libraries. · github.com, 15 Oct 2026
- Java semantics
- JSweet supplies implementations of core Java APIs to support shared server/client code and legacy Java migration. · github.com, 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. · github.com, 9 Oct 2026
- Language mapping
- Its syntax mapping covers Java classes, interfaces, functional types, unions, tuples, object types and string types. · github.com, 15 Oct 2026
- Library ecosystem
- The project advertises more than 1,000 JavaScript libraries, frameworks and plugins through JSweet bindings. · github.com, 15 Oct 2026
Where JSweet stands on Freedom251
- Code Transpilers#1 of 28