Essentials, Part 1, Lesson 1: Compiling & Running a Simple Program. Training Index The computer age is here to stay. Households and businesses all over the world use computers in one way or another because computers help individuals and businesses perform a wide range of tasks with speed, accuracy, and efficiency. Computers can perform all kinds of tasks ranging from running an animated 3D graphics application with background sound to calculating the number of vacation days you have coming to handling the payroll for a Fortune 500 company. When you want a computer to perform tasks, you write a program. But before you can write and compile programs, you need to understand what the Java platform is, and set your computer up to run the programs. A Word About the Java Platform The Java platform consists of the Java application programming interfaces (APIs) and the Java 1 virtual machine (JVM).
Java APIs are libraries of compiled code that you can use in your programs. The simple program in this lesson uses a Java API to print a line of text to the console. "Hello World!" for Microsoft Windows (The Java™ Tutorials > Getting Started > The "Hello World!" Application) It's time to write your first application! The following instructions are for users of Windows XP Professional, Windows XP Home, Windows Server 2003, Windows 2000 Professional, and Windows Vista. Instructions for other platforms are in "Hello World! " for Solaris OS and Linux and "Hello World! " for the NetBeans IDE. If you encounter problems with the instructions on this page, consult the Common Problems (and Their Solutions). A Checklist To write your first program, you'll need: The Java SE Development Kit 8 (JDK 8)You can download the Windows version now.
These two items are all you'll need to write your first application. Creating Your First Application Your first application, HelloWorldApp, will simply display the greeting "Hello world! ". Create a source fileA source file contains code, written in the Java programming language, that you and other programmers can understand. Create a Source File To create a source file, you have two options: First, start your editor. Be Careful When You Type. Trail: Learning the Java Language (The Java™ Tutorials) Overview (Java Platform SE 6) Variables (The Java™ Tutorials > Learning the Java Language > Language Basics)