In short, Adoptium Temurin is an installation-free OpenJDK environment for various operating systems.
The idea is to put a JDK or JRE on a USB drive so you can run Java programs wherever you need to without wasting time installing a runtime or development environment.
The big question is, can you use a JDK or JRE from a USB drive without having to use Depot and without having to install a separate package?
Binaries can be executed from anywhere, including external / usb drives. There should be no problem with running a jvm from a usb drive (provided it was ported to Haiku)
That’s the catch…you either transfer the JDK from HaikuDepot or you compile one for the Haiku. The JRE or JDK are OS specific. A MS Windows JRE will not execute Linux and vise versa. However, once you have Java Runtime binaries compiled…for Haiku and have the others on the USB stick. You get what you really want to do regardless of OS. Understand?
Legally, you can port Adoptium Temurin. It’s licensed as GPL v2 with classpath exceptions. You may struggle to get it into HaikuPorts with that license. Our guys really, really like MIT. But that’s fine, not everything has to be in HaikuPorts. You could work with the Adoptium team and get them to host it.
Practically … 115 MB of source code (compressed!)? It’s a beast. Welcome to your new full-time unpaid career.
If you are thinking instead of moving an existing Haiku OpenJDK to a USB drive, it wouldn’t just be a question of extracting the files. The executables expect the libraries etc to be in specific places. Lots of scripting to be done there, mostly to do with environment variables. And it would still only work between Haiku machines. You couldn’t just stick it into a Windows or Linux box and carry on like nothing has changed.
And I have to ask, why? Java is not dead, not at all, but it is mostly a corporate language now. I see very little action on the personal-use level. Sure, old established open-source projects are continuing. Pixelitor, Arachnophilia, Projectlibre etc. are still getting updates. New projects, not so much. But that’s just my personal impression.
There are no such restrictions on licenses for Haikuports. Otherwise we would not have bash, we would not have GCC, we wouldn’t even have a C library in Haiku itself.
Even in Haiku, we aim for MIT, but there are still some GPL sources in there.
There are many reasons why I want Java on a USB stick.
The first reason is personal. I learned to program as a teenager with Java 1.3, and I still love it as much as I did on the first day, even though I have to write absurd amounts of code to do simple things.
Another reason is tactical. Since the big blackout in Spain, Portugal, and southern France, I have been designing a small FM-modulated AFSK radio modem, controlled by the sound card. The idea is to be able to use any laptop with a charged battery to run the radio modem and create an HF data network independent of the internet.
Carrying as much JDK or JRE as possible on a USB stick, for as many operating systems as possible, makes it possible to run the radio modem software from a Windows PC to a mainframe running AIX, and even Haiku.
Yeah, that makes sense. First programming languages are like first loves, you never quite get over them. I was thinking from the POV of “what would this do for Haiku?”
There would be no direct or immediate benefits, but considering that Adoptium’s download page features the most “popular” operating systems (Windows, MacOS, Linux, Linux Alpine, AIX), having Haiku (32-bit and 64-bit) among the downloads would undoubtedly be a good boost. We would be “popular” too.