I have been wanting into Java for attainable future initiatives. Write As soon as Run Wherever (WORA) is the claimed advantage of utilizing Java, and my purpose is to do this for any platform.
Instance: write a program as soon as in Java so it could actually run on Home windows, Mac, Linux (deb, yum, and so forth), and iOS, and Android. I do not actually care about freeBSD, or another extra obscure issues. The top outcome ought to make the GUI on all platforms look the identical, and buttons to carry out the identical capabilities.
The issue is that I’ve seen you possibly can’t run regular Java applications on Android, and as an alternative you want one thing like Kotlin if you happen to wished it to run there, or do some further steps that convert the usual Java into Kotlin… And so far as I am conscious, Kotlin technically is Java, however fewer of it is unique libraries are included, and the syntax is a bit of completely different.
I do know there are numerous Java Growth Kits (JDK’s) together with the paid one by Oracle, however because of what I stated about Kotlin above, it makes me assume every JDK goes to be watered down with fewer options to a point.
Instance: For instance I select to make use of Amazon’s Corretto for my JDK. Their website says it is suitable with Oracle’s Java SE commonplace model… So I make a plain Java program on a desktop Linux machine with it, and it really works superb. It additionally works superb on Home windows 11. Then I attempt to put it on an Android, but it surely fails: the GUI is all incorrect, it would not ship requests, do calculations correctly, and so forth.
Since plain Java cannot run on an Android in accordance with the article above (with out doing further steps): is Java actually WORA, or is there one thing I am lacking?
How would you go round this downside? As a result of to me, it seems like a local language to every platform continues to be the most suitable choice for velocity of this system, and so forth, regardless that a separate code base for every platform is required (Swift for iOS, Kotlin for Android, and so forth).