Answer the question
In order to leave comments, you need to log in
Why can't the compiled program be run on another OS?
I watched a webinar on Java and it said that a program written in it can be transferred to another OS without recompilation and run.
But they didn’t really explain why it’s impossible, for example, to write and transfer in C ++. What is it connected with?
They also said that Java is a compiled-interpreted language. I'm confused, before that they said that Java is simply compiled. Please explain, I'm a total newbie.
Answer the question
In order to leave comments, you need to log in
If it’s extremely figurative:
From Java they make a bytecode that doesn’t matter where it is executed and it runs inside a special JVM
From C ++ they make a binary that binds (links) to external libs and the system environment and runs directly in the system
Because the C++ program is executed directly in the operating system, and the java program is executed in the java machine.
Why can't the compiled program be run on another OS?
Different operating systems have different formats of executable files, because The OS must understand how to load and execute the file.
Java is as compiled as PHP, they are interpreted languages, but due to JIT compilation, they can probably be called compiled-interpreted.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question