![]() This bytecode is the same on any JVM, which makes the code portable. This is made possible by the fact that Java code isn’t compiled to machine code that is executed directly by the CPU, but rather to bytecode which is executed by the JVM. You write your code once, and from that point it should be able to run on any machine which can run the Java Virtual Machine, or JVM. The slogan “ Write Once, Run Anywhere” (WORA) was coined by Sun Microsystems with regards to Java. By “easily” I mean - without complicated setup or platform-specific configuration, and obviously without modifying the source code. I define software portability as the ability to run the same application on multiple platforms easily. ![]() But is it indeed correct to claim that Java or Ruby apps are more portable than apps written in C or Go? Before answering this question, we need to define what portability means. ![]() Interpreted languages on the other hand (Python, Ruby, JavaScript), and also compiled languages which run on a virtual machine (Java, Scala), are usually praised for their portability. Languages which compile to machine code generate binaries that are specific to a CPU architecture and possibly an OS. Portability isn’t the first thing that comes to mind when thinking about low-level, compiled programming languages. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |