I have been trying into Java for attainable future initiatives. Write As soon as Run Anyplace (WORA) is the claimed advantage of utilizing Java, and my aim is to do this for any platform.
Instance: write a program as soon as in Java so it might probably run on Home windows, Mac, Linux (deb, yum, and many others), and iOS, and Android. I do not actually care about freeBSD, or every other extra obscure issues. The tip consequence 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 may’t run regular Java packages on Android, and as an alternative you want one thing like Kotlin should you 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 slightly totally different.
I do know there are various Java Improvement Kits (JDK’s) together with the paid one by Oracle, however attributable to what I mentioned about Kotlin above, it makes me assume every JDK goes to be watered down with fewer options to a point.
Instance: As an instance I select to make use of Amazon’s Corretto for my JDK. Their web site says it is suitable with Oracle’s Java SE customary model… So I make a plain Java program on a desktop Linux machine with it, and it really works high quality. It additionally works high quality on Home windows 11. Then I attempt to put it on an Android, however it fails: the GUI is all unsuitable, it would not ship requests, do calculations correctly, and many others.
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 to be like a local language to every platform remains to be the most suitable choice for velocity of this system, and many others, regardless that a separate code base for every platform is required (Swift for iOS, Kotlin for Android, and many others).