Latest posts from Codename One.
Blog

The Java Compiler That Became Its Own Test Case
Our Java-to-C translator is written in Java. That made it an obvious candidate for ParparVM, and a very effective way to discover what our runtime hadn’t been asked to do yet. ParparVM is now self-hosting: it can compile its own translator into a native executable, and that executable can translate Java programs. It’s an important step toward building Codename One with Codename One. It also gives us a roughly 37,000-line program that regularly exercises our collections, strings, file handling, exceptions, and collector together. ...

A Desktop Theme Has to Know About the Mouse
A button can have the right color and still feel wrong the moment you move the mouse over it. Desktop themes have to account for pointer states, font metrics, focus, and the conventions of the machine running the app. Native desktop themes are now available in Codename One, in a deeply experimental mode. This week’s release adds Fluent for Windows, Aqua for macOS, and Adwaita for GNOME. We’re keeping the current defaults while the implementation develops. ...

Xcode 27: The Build Settings That Can Stop a Release
An unchanged Java app can stop building because a number inside its generated Xcode project is now too low. No new API call, no changed screen, just a deployment target the new SDK refuses to accept. That was the first problem in our Xcode 27 work. Launch-screen metadata and scene lifecycle supplied the next two. This week’s release handles all three in the builder, where an application team should be able to expect them to work. ...

The Hard Part of Invite a Friend Is the Install
You spend $100 on ads for your app. How do you know whether you got your money’s worth? The ad platform can count clicks, but you need to know what happened afterward. Did those people install the app? Did they use it? Did any of them pay? Without that connection, you can keep spending money on ads that bring very little business. An invitation has the same problem. A user shares a link with a friend, and the friend may pass through an app store before your app can receive anything. If the invitation code disappears during installation, the later signup or purchase loses its connection to the invitation that started it. ...

One Vault, from Your Phone to the Browser
Encrypting a file is the easy part. Giving the same person access to it on a phone and in a browser, without handing the sync server the key, is where the application starts accumulating security code. Our new com.codename1.security.vault API takes responsibility for that work. It extends the security work in this week’s release to synchronized data and gives the JavaScript target a much better set of options than a key stored beside its ciphertext. ...

One Java Model from the App to PostgreSQL
The annoying part of full stack development is finding the same rule in three places. The app checks a field, the server checks it slightly differently, and the database model has another idea about what it should contain. Yesterday’s post explained why we brought Codename One’s runtime to the backend. Today we’ll build a reminder service and follow one model from Java code into the database. The backend is experimental, but the pieces here already include generated routing, pooled connections, an ORM, and transactions. ...

We Didn't Want to Build Another Java Server
Why Build Another Java Server? The last thing we wanted to build was another Java server framework. We have Spring, Micronaut, Quarkus, and enough ways to answer an HTTP request to fill a conference schedule. Yet we know Java developers who pick Node.js or Go for their newer projects. Why? The answers varied, but two kept coming up: size and performance, especially for microservices and serverless deployments; and full stack development. A process that starts for one request has a different budget from a server that stays up for a month. For full stack development, Codename One lets the app and server share entity classes and validation rules. One REST contract generates the app client and server dispatcher, while the same ORM annotations generate data access objects (DAOs) for local SQLite and the server database. ...

Android 17 Without the Last-Minute Scramble
One of the bugs in our Android 17 preparation was a version number. The platform was 37.2. One builder path removed the punctuation and read it as 372. That number sailed through minimum-version checks. A different path tried to parse the suffix as an integer and failed outright. Neither had anything to do with the application a customer was trying to build. This is the work we want to do before a target-SDK deadline arrives. The API 37 changes check the new platform and fix its path through the builder. The location button then exercises a new permission flow in a generated application. Along the way, PEM parsing and task removal take two more recurring pieces of security code out of individual apps. ...

Javadoc That Feels Like Your Website
Follow a link from the developer guide into an API method and you used to arrive in what felt like another website. The navigation changed. The styling changed. Dark mode made the join harder to hide. We had wrapped standard Javadoc output, scoped its CSS, and loaded its pages through JavaScript. Every improvement to the surrounding site left us with another detail to reconcile inside that wrapper. ...

Native Drag and Drop Meets Cross-Device Continuity
You are halfway through a draft on your phone when you sit down at your computer. The words are already written. The document is already open. Starting again should not be the price of changing screens. Finishing the draft raises another familiar task: getting its output into another application. Copy and paste can help, but dragging the document onto its destination is often the action you reach for first. ...

Faster Starts, Less JavaScript Overhead
A margin calculation is an odd place to find a startup stall. It sounds like arithmetic. In our native Mac profile, it could wait for the operating system’s main thread. Following that call led to screen-scale queries repeated across components, a theme scan repeated across styles, and a switch generating blurred artwork just to say how big it was. None of those costs required a complicated screen. They happened while constructing an ordinary one. ...

Faster Maps: Chasing Swiss Speed
After looking at Go’s collector, we turned to its maps. Swiss tables have an appealing premise: keep entries compact, use a small amount of metadata to narrow the search, and avoid chasing a separate object for every mapping. ParparVM already had compact arrays and separate metadata. We were starting closer than I expected. Then a missing key spoiled the picture. Three million containsKey calls took 32.7 seconds, while the benchmark we usually watched still looked healthy. It mostly asked for keys that existed. ...