<< Chapter < Page Chapter >> Page >
This module explains how to get started programming in Java.

Revised: Sun Mar 27 11:59:05 CDT 2016

Table of contents

Preface

General

This module is part of a sub-collection of modules designed to help you learn to program computers.

This module explains how to get started programming using the Java programming language.

Prerequisites

In addition to an Internet connection and a browser, you will need the following tools (as a minimum) to work through the exercises in these modules:

  • The Sun/Oracle Java Development Kit (JDK) (See (External Link) )
  • Documentation for the Sun/Oracle Java Development Kit (JDK) (See (External Link) or the documentation for the latest version of the JDK.)
  • A simple IDE or text editor for use in writing Java code.

The minimum prerequisites for understanding the material in these modules include:

  • An understanding of algebra.
  • An understanding of all of the material covered in the earlier modules in this Book.

Viewing tip

I recommend that you open another copy of this document in a separate browser window and use the following links to easily find and view the listings while you are reading about them.

Listings

Writing, compiling, and running Java programs

Writing Java code

Writing Java code is straightforward. You can write Java code using any plain text editor. You simply need to cause the output file to havean extension of .java.

There are a number of high-level Integrated Development Environments (IDEs) available, such as Eclipse and NetBeans, but they tend to be overkill for the relatively simple Java programsdescribed in these modules.

There are also some low-level IDEs available, such as JCreator and DrJava, which are very useful. I normally use a free version of JCreator, mainly becauseit contains a color-coded editor.

So, just find an editor that you are happy with and use it to write your Java code.

Preparing to compile and run Java code

Perhaps the most complicated thing is to get your computer set up for compiling and running Java code in the first place.

Downloading the java development kit (JDK)

You will need to download and install the free Java JDK from the Oracle/Sun website. As of November, 2012, you will find that website at (External Link)

There is a 64-bit version of the JDK, which works well on my home computer and on my office computer. However, some older computers may not be able tohandle the 64-bit version. A 32-bit version is provided to be used on older computers.

Whether you elect to use the 32-bit or 64-bit version is strictly up to you. Either of them should do the job very nicely.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Object-oriented programming (oop) with java. OpenStax CNX. Jun 29, 2016 Download for free at https://legacy.cnx.org/content/col11441/1.201
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?

Ask