I don't know the situation on mobile but for cross platform Desktop the JVM is a great target for "write once, run everywhere", and Kotlin is a modern language that fixes or improves a lot of Java's common complaints.
Assuming a JVM is installed, distribution is as simple as sending a packaged .jar file.
There is a huge ecosystem of available libraries in Java, many with Kotlin wrappers for idiomatic usage.
Assuming JVM is (or will be) installed is a little risky though, isn’t it? We got rid of it in our enterprise setting some years ago, and we hardly seem unique in having removed JAVA from our available techs in our area.
I know games aren’t exactly meant for enterprise, but it’s been even longer since I had a JVM on my private computer. Maybe I’m alone in that?
This is not to shit in Kotlin, it’s certainly a nice language, but I wouldn’t expect widespread adoption to be what it was a decades ago.
One usually just bundles a jre and package the whole thing to a binary[0]. You wouldn't even know the game you're playing is running java. One could probably improve this further with modules and the newer additions to java/jvm (jlink).
Yup, with jlink you don't need to ship a full JRE, just the parts your binary actually uses. The user just runs a small binary and doesn't need to install and update a separate JRE.
The alternative (which is against the initial argument that you just ship a .jar) seems to be to include a JRE with your software. Minecraft and LibreOffice do this for example.
My recent java experience is that you end up having to tune it and keep multiple versions and screw around a bunch if you’re doing more than one thing with it. Stick to Android dev and it’ll be fine after the initial config, but switch to something else or try to run some GUI java project off Github and you’ll lose time configuring it. I “nope” out of a lot of Java stuff as soon as I see it’s Java, as a result. If anything the situation seems a little worse than it was in, say, the ‘00s.
I sympathize with your problems, I also had to juggle multiple versions for a period of time on multiple projects. Docker thankfully eliminated that and even without it the most you have to do now days is to point "$JAVA_HOME" to another folder. Java and it's ecosystem is better than ever and the language updates since java 8 are great to work with. The JVM is great. Spring boot finally removed most of the the multiple days config issues. Everything is mature, every problem has one or more library to solve it.
> Assuming JVM is (or will be) installed is a little risky though, isn’t it?
At least in Linux the package management systems enable packagers to specify dependencies such as the JVM. In Windows perhaps it's possible to bundle a JVM of choice.
I wouldn't say "spectacularly", as I don't remember that many attempts at true end-user apps. Enterprise is ripe with Swing.
Nowadays of course the web has blunted our pain receptors for memory bloat and non-native UIs, thus you're probably running three Electron apps right now, compared to which Java is Win32ASM.
And as others pointed out, for games it doesn't matter anyway. You're not building a AAA-game or something for a 6510, so GC pauses and memory consumption don't matter, either. Plus rapid-development, refactoring and a setup where OOP actually makes good sense.
I wouldn't start Kotlin for that, but if you already know it, there's no reason not to use it.
GC is also not that big of an issue in these type of games if one's careful of using pools for the various objects, and then release stuff at appropriate times.
It's more that Desktop development just fizzled out. These days if you are targeting fortune 500 companies with custom applications, you'd have to support multiple platforms in any case and the web makes that a no brainer. Add mobile to the mix and it's game over for desktop app developers.
I'm sure there are still people doing it but it's becoming quite rare that that does not involve electron or similar with a lot of web technology. I haven't come across any projects involving desktop UIs in recent years. Plenty of native IOS/Android + web. But absolutely nothing that had desktop UI on a roadmap or backlog or even on a nice to have list.
Java used to own that space when it still existed. IMHO that went away between 2005-2010 time frame. Before that you could get away with not supporting OSX (or Linux, ever the afterthought) and building stuff with Visual Basic, Delphi or whatever.
I wouldn't really count either as "Desktop". It's basically mobile development for phones and tablets, which I wasn't excluding. ChromeOS is nice but mostly about running web stuff plus whatever kind of works from the Android or Linux ecosystem. I don't think there are a lot of people targeting that specifically.
Enterprise applications are almost exclusively web based. And consumer software that isn't games is mostly web based in electron or one of a few remaining big desktop products (e.g. MS Office or Adobe tools) and also a long tail of relatively niche stuff.
Last time I used a box or tower based desktop was in 2005, since then I only worked in offices where "desktops" are laptops, or more recently 2-1 hybrids, which most people use just like the desktops of yore plugged into docking stations.
It works fine for cross platform tools where how good the GUI looks is not a concern. As an example the last such app I seen was a tool to cleanup some save games for a video game that was Windows and Mac so the person that made the tool used Java and Mac users could benefit of the tool, For Windows only games most such tools use .Net and Windows Forms.
Good GUIs are possible, just that not everyone bothers to read books like "Filthy rich clients", having a designer on their team, or shelling out for component libraries like JGoodies.
What I mean is "good looking GUIs" , as a dev when I create a basic tool , something that are not for customers to see and complain about I don't care about fonts,paddings, "professional looking design" , you get your buttons and inputs and job is done.
The tool I use daily for making money is Intellij, I don't f* care that the menus and buttons do not match my DEs,
I would also prefer programs that use the system defaults rather then try to implement a better theming with custom buttons,colors and whatever some designer with big ego thinks is cool today(I can't understand why they like slim fonts with low contrast colors)
As well as the JVM, there is Kotlin/Native, based on LLVM. This allows a Kotlin mobile app to run on JVM in Android and as a compiled binary on iOS. It can also target WebAssembly to run in a browser too.
Assuming a JVM is installed, distribution is as simple as sending a packaged .jar file.
There is a huge ecosystem of available libraries in Java, many with Kotlin wrappers for idiomatic usage.