This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes What is byte code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is byte code?" Watch "What is byte code?" New topic

What is byte code?

uma kant pandey

Joined: Jan 06, 2009
Posts: 1
What is bytecode ?What does it actually contain ?
Henry Wong

Joined: Sep 28, 2004
Posts: 20053

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.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 43987
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: What is byte code?
It's not a secret anymore!