Isn't every language "write once, run anywhere" as long as you have its compiler? Then why is Java so special? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Isn't every language "write once, run anywhere" as long as you have its compiler? Then why is Java so special?

JVM is platform dependent anyway...

5th Jun 2017, 8:58 PM
Danilo
Danilo - avatar
5 Answers
+ 6
Yep, Danilo that's about the case.
12th Jun 2017, 2:50 PM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar
+ 5
The platform or Operating System is definitely a factor on which your​ product will run. WINDOWS, ANDROID, iOS, ... The Java developer doesn't have to worry about the issue it is independent.
5th Jun 2017, 9:08 PM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar
+ 4
So, from what I understood from you, Java is a "write once, run anywhere" because it doesn't have operating-system-specific commands, libraries, etc, unlike some other programming languages, i.e, the code you write will run on any platform (that has JVM).
12th Jun 2017, 2:47 PM
Danilo
Danilo - avatar
+ 3
For example, in c/c++ for windows you have windows.h and stdlib.h system (), but they don't work in linux
5th Jun 2017, 9:20 PM
Andrés04_ve
Andrés04_ve - avatar
+ 3
Andres don't you think it is normal that windows.h doesn't work in Linux. They are competing each other so. You can not compare a car with a shoe either...
6th Jun 2017, 7:33 AM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar