Compiling and running Java Program
Previous | Home | Next |
These instructions are for users of the NetBeans IDE. The NetBeans IDE runs on the Java platform, which means that you can use it with any operating system for which there is a JDK 6 available.
These operating systems include Microsoft Windows, Solaris OS, Linux, and Mac OS X. We recommend using the NetBeans IDE instead of the command line whenever possible.
To write your first program, you'll need:
1. The Java SE Development Kit 6 (JDK 6)
* For Microsoft Windows, Solaris OS, and Linux: http://java.sun.com/javase/6/download.jsp
* For Mac OS X: http://connect.apple.com
2. The NetBeans IDE
* For all platformshttp://www.netbeans.info/downloads/index.php
Creating Your First Application
Create an IDE project
Add code to the generated source file
Compile the source file into a .class file
Run the program
To compile
To compile your source file, choose Build | Build Main Project from the IDE's main menu.
To Run the Program
From the IDE's menu bar, choose Run | Run Main Project.
Previous | Home | Next |