Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is byte code?

 
uma kant pandey
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is bytecode ?What does it actually contain ?
 
Henry Wong
author
Marshal
Pie
Posts: 21123
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The way to think of bytecode is that it is the binary code for the Java virtual machine. The Java compiler takes your Java source, and compiles it to byte code.

Now, this Java virtual machine, is merely a virtual machine, so when it is loaded into the JVM, it will be compiled again to the native op codes -- which will be different based on the local processor and OS.


Henry
 
Campbell Ritchie
Sheriff
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read the bytecode with a hex editor, and look in the JVM specification where you can see what each code means. It looks very similar to assembler.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic