<< Chapter < Page Chapter >> Page >

Writing, compiling, and running Java programs

Writing Java code

Fortunately, 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 programs described in this module.

There are also some low-level IDEs available, such as JCreator and DrJava, which are very useful for sighted students. However, I don't know anything abouttheir level of accessibility. I normally use a free version of JCreator, mainly because it contains a color-coded editor, but that feature wouldn't be usefulfor a blind student.

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.

The java development kit (JDK)

You will need to download and install the free Java JDK from (External Link)

I notice that Java SE 7 has been released very recently. However, my SVG graphics library was tested using Java SE 6 Update 26, and that is what I wouldrecommend. Also there is a 64-bit version, but my library has not been tested with the 64-bit version. If your operating system will accommodate it, Irecommend that you stick with the 32 bit version just in case the 64-bit version is not compatible with my library.

You will find installation instructions on the download page shown above.

JDOM version 1.1.1

You will also need to download and install a class library named JDOM 1.1.1 at (External Link)

When you do that download, you will receive a zip file that also contains some installation instructions. However, my experience is that thoseinstallation instructions are overkill, at least that is the case on a Windows machine.

All you need to do is to extract the file named jdom.jar from the zip file (look for it in the build directory in the zip file) , store it somewhere on your disk, and put it on the classpath at compile time and runtime. (I will explain the bit about the classpath a little later.)

In my case, I'm running Windows Vista Premium Home Edition and I elected to store the jdom.jar file in the following folder :

C:\Program Files (x86)\Java\jdom-1.1.1\build\jdom.jar

It doesn't really matter where you store it as long as you know how to specify that location in the classpath later.

Compiling and running Java code

There are a variety of ways to compile and run Java code. The way that I will describe here is the most basic and, in my opinion, the most reliable. These instructionsapply to a Windows operating system. If you are using a different operating system, you will need to translate the instructions to your operating system.

Write your Java program

Begin by writing your Java program into a text file with an extension of .java. Save it in a folder somewhere on your disk. Make sure that you adhere tothe earlier instructions regarding the name of the class and the name of the file, and remember that everything is case sensitive.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Accessible physics concepts for blind students. OpenStax CNX. Oct 02, 2015 Download for free at https://legacy.cnx.org/content/col11294/1.36
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?

Ask