10.5 C
Canberra
Wednesday, October 29, 2025

android – How is Java Write As soon as Run Wherever when it might probably’t be used in every single place?


I have been trying 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 try 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 some other extra obscure issues. The tip outcome ought to make the GUI on all platforms look the identical, and buttons to carry out the identical features.

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 in case you needed 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 somewhat totally different.

I do know there are numerous Java Growth Kits (JDK’s) together with the paid one by Oracle, however on account of what I stated about Kotlin above, it makes me assume every JDK goes to be watered down with fewer options to some extent.

Instance: For example I select to make use of Amazon’s Corretto for my JDK. Their web site says it is suitable with Oracle’s Java SE normal 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, but it surely fails: the GUI is all fallacious, it would not ship requests, do calculations correctly, and many others.

Since plain Java cannot run on an Android in keeping with the article above (with out doing further steps): is Java really WORA, or is there one thing I am lacking?

How would you go round this drawback? As a result of to me, it seems like a local language to every platform remains to be the most suitable choice for pace of this system, and many others, though a separate code base for every platform is required (Swift for iOS, Kotlin for Android, and many others).

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles