Java
Java is a free object-oriented programming language developed at Sun Microsystems during the early 1990s. Today it’s ubiquitous.
Java posts and programs:
- Virtual Machines: Windows 7 host and Ubuntu 9.10 guest
- Java’s Sorted Collections and the Comparable and Comparator Interfaces
- AT91SAM7S256 aka the NXT Brain
- Artifact J-2: Java RPN Calculator (Command Prompt)
- Artifact J-1: Codeword Parity Validator
Code written in Java is compiled into Java bytecode, which is then executed in a Java virtual machine (JVM). The JVM interprets or just-in-time compiles the bytecode into native machine code.
- Where did I get it
- The latest version of Java is 1.6.0-16 available at Sun Microsystems.
- What did I install?
- Download and install the Java Development Kit (JDK) 6 Update 16. I also installed the IDE Eclipse.
- Where did I install it?
- Java doesn’t like spaces in folder names so putting it in *\Program Files\* isn’t a good idea. I put it in C:\Java.
- What did I forget to do after I installed it?
- I forgot to set my environment variables. Set these in Advanced System Settings in Control Panel/System:
Environment variables (Control Panel)
| CLASSPATH | .; |
| JAVA_HOME | C:\Java\jdk1.6.0_16 |
| NXJ_HOME | C:\Java\leJOS |
| PATH | %JAVA_HOME%\bin; %NXJ_HOME%\bin; |
The whole Java Platform is really a couple of things:
- The Java programming language
- The Java Development kit, a selection of programming tools including a compiler which compiles Java source code into platform-independent Java bytecode
- A large body of reusable code to simplify the programmer’s task. This code is a set of dynamically loadable libraries known as the Java Application Programmer Interface, or API.
- The Java Virtual Machine (JVM), which interprets Java bytecode into native processor instructions at run-time (also knows as the Java Runtime Environment (JRE) just-in-time compiler). This is what we need on our computer to execute Java programs and web applications.
The best place to learn Java is at the official Java tutorials.