eHow launches Android app: Get the best of eHow on the go.

How To

How to Compile a Java Program

Contributor
By Launie Sorrels
eHow Contributing Writer
(0 Ratings)
Compile a Java Program
Compile a Java Program
www.ilabz.net

There are two parts to the Java platform, the Java application programming interface, or API, and the Java virtual machine, or JVM. An API is a preset amount of code that can be called from within a program. This saves the programmer programming time. The JVM interprets the code and turns into an application to be used. This allows the code to be used on any computer, instead of just the computers that have the correct software installed.

From Quick Guide: Writing Computer Programs
Difficulty: Moderate
Instructions
  1. Step 1

    Open the text editor of your choice.

  2. Step 2

    Write the code and create the source file.

  3. Step 3

    Save the source file with a .java extension. If the name of your file is Example, then name it Example.java. Save the file as a txt file in the Java folder.

  4. Step 4

    Open the command window to get to the command prompt.

  5. Step 5

    Find the file you just created. It will be in the Java folder.

  6. Step 6

    Compile the code. Type "javac Example.java" without the quotes. Java is case sensitive. So if you capitalized the name of the file, be sure to capitalize it here. Once compiled, you will see a new file has been created in the Java folder named Example.class.

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics