Skip to main content
corrected type of code C compiles down to.
Source Link
CurtisHx
  • 1.2k
  • 1
  • 9
  • 18

There's some major differences between Java and C. Java is isolated from the operating system via the java virtual machine (JVM). The JVM abstracts the operating system away from the program. A java application might ask the JVM for a chunk of memory, and the JVM then asks the OS for that memory. There are many JVMs for different platforms / operating systems. The JVM is what allows the same java program to run on different platforms.

With C, there is no OS isolation. C programs (usually) run directly on top of the OS, making direct OS calls. This makes ties that C program to a specific operating system / platform. Any non-trivial program is going to make calls into the operating system. In addition, C programs are compiled down into bytemachine code, which is hardware specific. A compiled C program for x86 cannot be directly run on an ARM processor.

There's some major differences between Java and C. Java is isolated from the operating system via the java virtual machine (JVM). The JVM abstracts the operating system away from the program. A java application might ask the JVM for a chunk of memory, and the JVM then asks the OS for that memory. There are many JVMs for different platforms / operating systems. The JVM is what allows the same java program to run on different platforms.

With C, there is no OS isolation. C programs (usually) run directly on top of the OS, making direct OS calls. This makes ties that C program to a specific operating system / platform. Any non-trivial program is going to make calls into the operating system. In addition, C programs are compiled down into byte code, which is hardware specific. A compiled C program for x86 cannot be directly run on an ARM processor.

There's some major differences between Java and C. Java is isolated from the operating system via the java virtual machine (JVM). The JVM abstracts the operating system away from the program. A java application might ask the JVM for a chunk of memory, and the JVM then asks the OS for that memory. There are many JVMs for different platforms / operating systems. The JVM is what allows the same java program to run on different platforms.

With C, there is no OS isolation. C programs (usually) run directly on top of the OS, making direct OS calls. This makes ties that C program to a specific operating system / platform. Any non-trivial program is going to make calls into the operating system. In addition, C programs are compiled down into machine code, which is hardware specific. A compiled C program for x86 cannot be directly run on an ARM processor.

Source Link
CurtisHx
  • 1.2k
  • 1
  • 9
  • 18

There's some major differences between Java and C. Java is isolated from the operating system via the java virtual machine (JVM). The JVM abstracts the operating system away from the program. A java application might ask the JVM for a chunk of memory, and the JVM then asks the OS for that memory. There are many JVMs for different platforms / operating systems. The JVM is what allows the same java program to run on different platforms.

With C, there is no OS isolation. C programs (usually) run directly on top of the OS, making direct OS calls. This makes ties that C program to a specific operating system / platform. Any non-trivial program is going to make calls into the operating system. In addition, C programs are compiled down into byte code, which is hardware specific. A compiled C program for x86 cannot be directly run on an ARM processor.