Skip to content

CheerpJ 4.1: Java 17 Support Lands in Your Browser with WebAssembly

Hey everyone, John here! Let’s Talk About Java Apps in Your Browser

You know how sometimes you want to use a specific program, but you have to download and install a bunch of stuff first? It can be a real headache, right?

Well, today I want to talk about something pretty neat that’s making it much easier for certain kinds of programs to run directly in your web browser, just like you’re watching a YouTube video or checking your email. No big downloads, no tricky installations!

The tech we’re looking at is called CheerpJ, from a company called Leaning Technologies. They’ve just released an update, CheerpJ 4.1, and it’s got some exciting new features, especially if you’re using a phone or tablet.

So, What Exactly Does CheerpJ Do?

At its heart, CheerpJ is like a special translator that allows older, traditional computer programs, specifically those written in a language called Java, to run smoothly inside your web browser. Think of it as magic that lets your browser understand and display Java programs without needing any special software installed on your computer. It’s pretty groundbreaking because usually, Java programs need their own dedicated environment to run.

Lila: Wait, John, you said “Java applications.” What are those, exactly? Are they like apps on my phone?

John: Great question, Lila! Yes, you can think of them kind of like apps. “Java applications” are just programs or software built using the Java programming language. For a long time, Java was super popular for building all sorts of software, from big business tools to games, and even parts of Android apps. The tricky part was always getting them to run directly on a website without a user having to do extra steps. CheerpJ solves that!

CheerpJ 4.1: Big Leaps Forward

This new version, CheerpJ 4.1, is a big step forward. Here are the key things they’ve improved:

  • Better Support for Modern Java: CheerpJ 4.1 now previews support for “Java 17.”
  • Lila: Java 17? Is that like version 17 of a video game?

    John: Haha, good analogy, Lila! Yes, it’s essentially a newer, updated version of the Java programming language. Developers often work with the latest versions because they come with new features and improvements. Java 17 is also a “long-term support” (LTS) release, which basically means it’s a super stable version that developers can rely on for a very long time, like a classic car that’s guaranteed to run smoothly for years. The full, stable support for Java 17 is planned for the next big release, CheerpJ 5.0, later this year.

  • Unprecedented Mobile Support: This is arguably the biggest news! For the first time, complex Java programs can now work across your smartphones and tablets. Imagine being able to access sophisticated tools or old applications that were never designed for mobile, directly from your phone’s browser! This opens up a lot of possibilities for businesses and everyday users.

    They even support what are called “AWT-based” and “Swing-based applications.”

    Lila: AWT and Swing? Sounds like dance moves! What are those?

    John: Funny, Lila! They’re not dance moves, but they are ways that developers used to choreograph, or design, the ‘look and feel’ of older Java programs. Think of them as different toolkits or styles for creating the buttons, windows, and menus you see in a program. So, CheerpJ can now handle programs built with these specific older design methods, making them usable on mobile devices.

  • Other Improvements:
    • SSL (Secure Sockets Layer) support: This means secure connections, like when you see a little padlock icon next to a website address. It’s like a secure handshake that keeps your information safe when it travels across the internet.
    • Audio in Java 11: Sound capabilities for programs running on Java 11.
    • Performance optimizations: Making everything run faster and smoother.
    • Improved networking stack: This is basically the part of the software that handles all the ‘talking’ over the internet, making communication more reliable and efficient.

How Does This Magic Happen? Understanding and JVM

You might be wondering, how does CheerpJ pull this off? It uses some clever underlying technologies:

  • WebAssembly (Wasm): This is the secret sauce.
  • Lila: WebAssembly? That sounds super techy, John. Can you explain it simply?

    John: Of course, Lila! Imagine you have a translator who can take any spoken language and instantly turn it into a language your computer understands super fast, right inside your web browser. That’s kind of what WebAssembly is. It’s a new type of code for web browsers that lets programs run almost as fast as if they were native computer applications, without needing to install anything extra. It’s like a universal, super-efficient engine for the web.

  • JVM (Java Virtual Machine) for the Browser: CheerpJ basically acts as a “Java Virtual Machine” that runs entirely within your browser.
  • Lila: And a “Java Virtual Machine”? Is that like a robot that plays Java?

    John: Haha, a little bit, Lila! Think of a JVM as a special ‘engine’ or an ‘interpreter’ that allows Java programs to run on different types of computers. Java programs are written once, and then the JVM translates them so they can run anywhere – on a Windows PC, a Mac, or a Linux machine. CheerpJ brings this entire ‘engine’ into your web browser, so the browser itself becomes capable of running Java programs directly, without needing a separate installation. It includes an “OpenJDK runtime,” which is the actual core software that makes Java programs work.

CheerpJ also comes with an “emulation layer.” This is like a mimic or a stand-in that lets Java programs do things they usually would, like accessing files (within the browser’s safe sandbox, of course) or handling general networking, all within your browser window. It’s built using WebAssembly, , and HTML5 technologies, and the coolest part is that it’s essentially a JavaScript library – meaning it runs entirely on your device, with no “server-side” or “cloud-based component” needed. In simple terms, it doesn’t need to talk to a separate computer on the internet to make things work; it all happens in your browser.

John’s Take: Why This Matters

From my perspective, this CheerpJ update is a big deal because it truly breaks down barriers. It means that valuable, existing Java software, some of which might be critical for businesses or have unique capabilities, doesn’t need to be completely rewritten for the web or for mobile. It can just… work. This saves a tremendous amount of time and money, making older tech more accessible and extending its lifespan in a truly modern way. The move towards seamless mobile access is particularly exciting.

Lila’s Take:

So, if I get this right, CheerpJ is like a universal remote for old Java programs, letting them play on new TVs (our browsers and phones) without needing a ton of extra cables or players? That sounds really convenient!

This article is based on the following original source, summarized from the author’s perspective:
CheerpJ WebAssembly JVM previews Java 17 support

Leave a Reply

Your email address will not be published. Required fields are marked *