Bytecode

?

What is Bytecode?

  • Bytecode is computer object code that is processed by a program, usually referred to as a virtual machine, rather than by the "real" computer machine, the hardware processor.
  • For example, Java bytecode is compiled using either one or two bytes to define the instruction and then any number of bytes to pass on parameters. This code can then be executed on any computer which is running the Java virtual machine regardless of what type of processor or operating system is being used.
  • The prograjm is still written in Java and it is then compiled to bytecode which runs on the virtual machine.
1 of 3

What are the advantages of bytecode?

  • Platform Independence
  • Can create any number of programming languages and have them compile down to the same bytecode
  • Could easilt create cross language converters
  • x86, x64 and IA64 no longer need to be compiled as seperate binary (only proper virtual machine needs installing)
  • Each OS needs to create a virtual machine- will have support for same program
  • Just in time compilation allows you to update a program just by replacing a single patched source file.
2 of 3

What are the disadvantages of bytecode?

  • Bugs created by bytecode manipulation are likely to be more difficult to diagnose. Examination of source code and source level debugging will be harder.
  • Speed: Since programming must be translated from generic bytecode to the machine code for the target system as it is being run, it is impossible for java to perform as quickly as langauges that can compile directly to machine code.
  • Platform specific features: As the java virtual machine must run on a wide variety of systems, features specific to one OS are often not implemented into java programs.
3 of 3

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Bytecode resources »