Personal tools
You are here: Home Information Systems Java Platform Introduction 4. Java and Javascript 4.1 The Java Compiler

4.1 The Java Compiler

Document Actions
  • Send this
  • Print this
  • Content View
  • Bookmarks

The Java Compiler

<-- Previous

Table of Contents

Next -->

If you are working on a Windows computer (God forbid), we'd like to take this opportunity to convince you to change to a Linux system. If you're still unconvinced, you can find the information you need on the Java compiler for your computer here.

As explained in the previous page, Java programs must be compiled before they can be run, and there is a Java compiler available on all computers on which the Java SDK has been installed. On a Linux computer the Java SDK will probably have been installed by default when the system was installed; if this is not the case you will have to consult your system documentation to see how to install Java on your computer. Once installed Java should automatically be accessible from the terminal command prompt.

Java is a command-driven language, which means that you have to drive it from the terminal / console - also known as the command prompt on some systems such as Windows. As a Linux user you will be familiar with the terminal or console. To check that Java is properly installed and working type the command java followed by a space, followed by the option argument -version at the command prompt. Hit the 'Enter' key, and you should see something similar to the image below:

If this is what you see, then you have no problems - Java is ready to roll.
PLEASE NOTE! Rule number 1: Java is caSe sEnsiTivE! This is what happens if you forget this rule:

OK - all's well with the Java executables; let's forget them for a little while and go to take a look at a first Java program.

<-- Previous

Table of Contents

Next -->

Copyright 2007-2008, by the Contributing Authors. Cite/attribute Resource. 4.1 The Java Compiler. (2008, July 16). Retrieved May 26, 2013, from UWC Free Courseware Web site: http://freecourseware.uwc.ac.za/freecourseware/information-systems/java-platform-introduction/java-and-javascript-1/the-java-compiler. This work is licensed under a Creative Commons License : Attribution-ShareAlike 3.0. Creative Commons License : Attribution-ShareAlike 3.0