JSweet
jsweet.org
- Free plan
- Open source
- Windows
- macOS
- Linux
- Web
- iPhone and iPad
- Android
- API
- Self-hosted
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 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. The project 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. JSweet supports CommonJS, AMD, and UMD modules and includes a mode for debugging Java code in a browser. Its setup instructions call for Git, Node.js, and Maven, then use Maven 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.
Who it suits
JSweet suits Java developers who want to build web or mobile HTML5 applications using JavaScript libraries and frameworks. It also fits projects targeting browsers or Node.js that can use JavaScript output.
Good to know, and what to watch
- Generates type-checked JavaScript
- Supports over 1,000 JavaScript libraries and plugins
- Offers Eclipse, Maven, and Gradle plugins
- Supports CommonJS, AMD, and UMD modules
- Includes browser debugging for Java code
- Setup calls for Git, Node.js, and Maven
- JavaScript output is generated from Java source
Plans
Every plan and priceJSweet
Open source
Getting started
- Open the JSweet website
- Install Git, Node.js, and Maven
- Create or obtain a JSweet quickstart project
- Use Maven to generate JavaScript
- Run the generated program in a browser or Node.js environment
The Club's review
Overview
JSweet is a source-to-source transpiler that turns Java programs into TypeScript and JavaScript for browser, mobile Web view, and Node.js projects. It suits Java developers building HTML5 applications who want to use JavaScript libraries while keeping Java as their source language. Its type-checked output and Java build-tool integrations make that bridge useful, though setup requires Git, Node.js, and Maven.
Key features
Typed translation and JavaScript compatibility
JSweet uses Oracle’s Java compiler and Microsoft’s TypeScript compiler to generate type-checked JavaScript programs. That gives Java teams a compiler-based check along the translation path. The output is regular JavaScript, so it can interoperate directly with JavaScript programs and libraries rather than requiring a separate runtime ecosystem.
Its language mapping covers Java syntax and constructs, async/await, and ECMAScript targets from ES3 through ES6. CommonJS, AMD, and UMD module support gives projects options for their JavaScript module format, and the generated programs can run in browsers or Node.js. This breadth is useful for teams targeting different JavaScript environments, although the target range ends at ES6.
Libraries, integrations, and debugging
JSweet supports more than 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. That library bridge is central to its appeal: Java developers can work with tools from the JavaScript ecosystem without changing their source language. Eclipse, Maven, and Gradle plugins fit established Java workflows, with Angular, Cordova, Node.js, and Three.js among the named integrations.
A debug mode lets developers debug Java code in a browser. The setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project. Teams already comfortable with that toolchain have a direct starting point; those without it face extra setup before reaching the core workflow.
Pricing
JSweet is free and open source. Its sole listed plan, JSweet, costs nothing and describes an open-source Java-to-JavaScript transpiler. There are no paid tiers or plan quotas to weigh in this offering, so the choice comes down to whether its Java-based workflow fits the project.
Platforms
JSweet is listed for Android, iOS, Linux, macOS, web, and Windows, as well as API use. Its generated programs target browsers and Node.js, including mobile Web views; the platform range is useful for teams carrying JavaScript output across web and mobile contexts.
Who it's for
JSweet is a strong fit for Java developers building web or mobile HTML5 applications who want access to JavaScript libraries and frameworks. Its Maven, Gradle, and Eclipse integrations make it especially relevant to teams using those tools already. It is a less natural choice for developers who do not want a Java-to-JavaScript transpilation workflow or who are not prepared to install Git, Node.js, and Maven.
Pros and cons
- Pros: Compiler-based type checking supports a more structured translation workflow for Java teams.
- Pros: More than 1,000 JavaScript libraries, frameworks, and plugins are available through Maven-packaged candies.
- Pros: Eclipse, Maven, and Gradle integrations connect JSweet to common Java development tools.
- Pros: Regular JavaScript output, multiple module formats, and browser debugging support practical integration and troubleshooting.
- Cons: Git, Node.js, and Maven are prerequisites, adding toolchain setup to adoption.
- Cons: Its central use case is Java developers targeting JavaScript environments; teams seeking another source language or a different compiler workflow should compare alternatives.
Alternatives
Code Transpilers is a useful category to browse when comparing tools beyond these specific options.
- SourceMeld is a freemium option with a free Community Edition for a single Docker image deployment, agentic search with supported model providers, an MCP server, and integrations for GitHub, Gerrit, and Bitbucket. Choose it when that search and code-hosting workflow is the priority.
- Google Web Toolkit is a free, open-source alternative under Apache 2.0. Consider it when that toolkit is a better fit for your project.
- 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.
- ClojureScript is free and open source under the Eclipse Public License 1.0. Consider it when ClojureScript is the language and licensing fit you need.
- Scala.js is a free Scala-to-JavaScript compiler managed through a Scala build tool. It is the alternative to consider if your team works in Scala.
- SWC is a free, open-source Rust-based developer toolchain. Choose it when that toolchain better matches your development work.
- Transcrypt is a free, open-source option licensed under Apache 2.0. It is another option to compare when evaluating transpilers.
- Cython is free and available under the Apache 2.0 license. Consider it as another open-source tool in the comparison.
Verdict
Java teams building web or mobile HTML5 applications should consider JSweet when they want to retain Java while reaching JavaScript libraries and runtimes. Its compiler checks, broad library support, and Java-tool integrations make that path concrete. Look elsewhere if you want a different source language or do not want the Git, Node.js, and Maven setup.
The verdict
JSweet gives Java developers a source-to-source path to JavaScript and TypeScript, with integrations for familiar Java tools and JavaScript libraries. Its setup depends on Git, Node.js, and Maven.
Questions people ask
How much does JSweet cost?
JSweet is free. The listed JSweet plan is free and is open source.
Which platforms can JSweet target?
The listing names Android, API, iOS, Linux, macOS, web, and Windows platforms.
Which JavaScript module formats are supported?
JSweet supports CommonJS, AMD, and UMD modules.
Does it work with JavaScript libraries?
Yes. The project lists support for more than 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies.
Which integrations are listed?
Plugins are listed for Eclipse, Maven, and Gradle. Example integrations include Angular, Cordova, Node.js, and Three.js.
What the maker publishes
- Async support
- Async and await programming idioms are supported. source
- Build integrations
- Official tooling includes Eclipse, Maven and Gradle plugins. source
- Candies
- Java descriptions of JavaScript APIs are packaged as Maven artifacts called candies. source
- Candy generation
- A candy generator can create Java APIs from TypeScript definition files. source
- 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. source
- Current Maven artifact
- Maven Central lists org.jsweet:jsweet-transpiler version 3.1.0. source
- Debugging
- JSweet includes a debug mode for debugging Java code in a browser. source
- Debugging
- A debug mode is provided for debugging Java code in a browser. source
- Dependency exposure
- MvnRepository flags multiple dependency vulnerabilities for the older 2.3.5 artifact, including Log4j and Commons IO issues. source
- Developer identity
- The Maven POM names Renaud Pawlak and Louis Grignon as project developers. source
- ECMAScript targets
- The compiler lists ES3 through ES6 as supported output targets. source
- Framework integrations
- Examples and bindings cover JQuery, Underscore, Angular, Backbone, Cordova, Node.js, Ionic, React and Three.js. source
- Getting started
- The project’s setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project. source
- Independent artifact licence
- MvnRepository records jsweet-transpiler 2.3.5 as Apache 2.0 licensed. source
- Independent ecosystem comparison
- LibHunt lists JSweet alongside alternatives such as GWT, J2CL, WebFX and Vaadin. source
- Installation requirements
- The quick-start workflow requires Git, Node.js, npm and Maven available on the command path. source
- Integrations
- The project lists Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations. source
- J4TS
- The J4TS candy provides basic Java APIs using a fork of GWT JRE emulation. source
- Java constructs
- The compiler supports constructs such as inner and anonymous classes, final fields, overloads, instanceof and static initializers. source
- JavaScript compatibility
- JSweet says generated code is regular JavaScript that can interoperate directly with JavaScript programs and libraries. source
- JavaScript interoperability
- Generated output is ordinary JavaScript intended to interoperate directly with JavaScript code and libraries. source
- Java semantics
- JSweet supplies implementations of core Java APIs to support shared server/client code and legacy Java migration. source
- Language features
- Its listed features include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6. source
- Language mapping
- Its syntax mapping covers Java classes, interfaces, functional types, unions, tuples, object types and string types. source
Checked against the maker's pages on 15 Oct 2026.