Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
During this first video, we get a high-level look at what Java annotations look like in code, and at what they can do for us.
Java Compiler
The Java compiler you use - likely javac or Eclipse Compiler for Java (ECJ) if you're using Eclipse - is what translates your source code in Java bytecode. As a developer, you code the ".java" files, and from these the compiler creates ".class" files (bytecode). This bytecode is what is actually loaded into the Java Virtual Machine (JVM) when you run your Java application.
What makes Java applications so portable is that in general, Java bytecode can run on any device that contains a valid implementation of a JVM. This implementation could be a JVM written for a Linux machine, Mac, PC, or another platform. The JVM is what will compile bytecode to the machine code that is understood natively by the machine on which it is running. The JVMs for each platform had to be created separately, since how a JVM interacts with Windows is different than how it must interact with OSX, for example.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up