HACKER Q&A
📣 LikeAnElephant

Why isn't Java/Kotlin seen as a contender for cross-platform apps?


I don't code in any of these platforms, so I'm asking genuinely.

When this community talks about cross-platform desktop applications, they typically mean Electron, Tauri, or other similar web-based desktop apps. All of which are less than ideal for various reasons.

Java apps have been cross-platform since well before it was cool. I've heard a lot of positive things about Kotlin. It's also kinda-sorta native, I think? So why does it seem Java-based cross-platform apps are rarely mentioned in these discussions?

I know the negative aspects of the web-based desktop apps (bundle size, speed, etc). What are the negative aspects of a Java-based app?


  👤 yen223 Accepted Answer ✓
The JVM doesn't have much of a presence in iOS, so that removes one fairly major platform. Kotlin Native, as an alternative to Swift, is not quite there yet.

As for desktop apps, I guess it's just because web technologies has been Good Enough for a lot of use cases where one might consider using Java or Kotlin, plus you have a vastly bigger ecosystem, plus much better support across platforms (including iOS).

For what it's worth, I'm keeping one eye out on Compose Multiplatform: https://github.com/JetBrains/compose-jb . While it is still new and fairly rough, I've had positive experiences building simple desktop apps with it.


👤 verdverm
How many code bases do you have to maintain when you want your UI to be available as both a desktop app and a webapp?

How many frontend developers are available for JS vs Java?

Is the JS bundle size that important when it comes to a desktop app? How does it compare to a jar file?

These are just a few of the questions that play into people's decisions.


👤 daltont
Within the enterprise it seems that a lot of application used in internally are better suited to be used within a browser. For example, CRUD type applications like timesheet entry.

In the public space, people don't want to even take the time and are leery of downloading anything like an executable jar. People want to instant gratification of being able to play/use something in the browser. Wordle gets nowhere if it was an executable jar.