Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

work is ongoing


I'm quite fuzzy on the technical details - but do you think it'd ever lead to JavaFX running everywhere? It was a while before JFX worked with Graal Native

I'd like to someday be able to easily distribute my little GUI apps (for scientific applications) in a compile-once kind of way. Asking users to install a JVM runtime has turned out to be unworkable (everyone installs the Java 8 runtime b/c that's what comes up first on Google and then the apps silently crash/don't-work and users are confused)


    > everyone installs the Java 8 runtime b/c that's what comes up first on Google and then the apps silently crash/don't-work and users are confused
Is it not possible to add a tiny check from main()? If version is less than required, then show a (dreaded) JMessageBox or print message to STDOUT/STDERR where users can safely download the correct JDK.


No, it’s not possible, because bytecode compiled at a higher level cannot be run by JDK8. It can’t even parse the class file.

Most projects are compiling at JDK11 or JDK17 now at least, if not JDK21, which is the latest LTS.

the latest release is JDK22. so if you’re running 8, you won’t be able to run much modern Java at all.


Stuff like this is why I built Cosmo. I saw the writing on the wall, when the Java installer started adding toolbars to my browser. I made a solemn vow on that day to never build software that can't run unless my users install someone else's software first. Now, after walking away from hundreds of thousands of dollars of stock, and putting forth years of effort hacking in my garage, I'm finally a first-class citizen of all platforms and you can be too. If Java starts supporting building Cosmo binaries, the amount of love and trust that'll earn will be like how Meta pulled themselves out of the Cambridge Analytica mud by releasing LLaMA.


No idea. I'm guessing the process doesn't even launch (I don't remember if I checked this..). Do you have an example with a check ? I'd love to add it. You'd probably need a very basic Swing error popup


yes, I think java.desktop can work on top of cosmo, so long as we figure out the rest of the work to get a Native Image backend working for cosmo.

in the meantime, look at Native Image and jlink, as neither of these require a Java installation on the target machine.

jlink is usually not workable because it requires JPMS. not even guava ships a module info yet, so that’s tough.

Native Image works great, it just needs a cosmo backend. It supports most of Java’s native desktop APIs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: