CSCI 3701: Advanced Object
Assignment 0: Using the Java SDK
and the NetBeans IDE
The purpose of this exercise is to introduce you to using the Java SDK (Software
and the Netbeans IDE
on your home PC. There is nothing
to turn in or
to grade; however, doing this now will make things much easier when you do the first
the Java SDK
and NetBeans IDE
You will first need to
the Java SDK (software development kit), which includes
the java compile
r, the run
time interpreter, and built
in class libraries.
bundled with the Netbeans IDE, a very useful platform for developing and testing Java
Go to the Sun page for downloading Java 1.
(and the NetBeans IDE)
Once this is done, you will see the usual things that happen when you install software. By
related to Java
should be in the directory
The NetBeans files will be in
Downloading and Viewing the Test Program with the
a very nice IDE (integ
rated development environment) for creating and
testing Java programs. While it can generate some code automatically, we will not be
using that ability right now
until you know a lot more about Java, you won’t be able to
understand what is being generate
There is a simple program on my web site (the same one we used in class) to make sure
First, set up the NetBeans environment for the test:
Open NetBeans. You can do this from the icon installed on your desktop (if you
chose to do th
is), or from
from the top menu.
This will open a window for defining project properties.
as the category and
as the project. Then press
The next window
allows you to choose the name and location of the project, and
the name of the main class.
Since the class on the web page is
important). Note that under the “Main Class”, the name “hello.
” will appear
(this is related to the package being created)
For the location, select some folder that you want to use for your work. Press
At this point
you should have something that looks like the below. The window
on the right contains all of the code th
at has already been generated for you.
Later on, when you know a bit more about the structure of Java classes, you will
actually use this code. For n
ow, however, just delete it all.
You can now load the
code from the web page into the IDE:
pen the following link to the
of the code in the example and
the code into the right side of the NetBeans window:
You can now compil
e and run the code in the IDE:
Build Main Project
This will compile the application. If there are no errors, you will see the message
in the bottom window.
Run Main Project
You should s
ee the following application on the screen:
Press the button and see what happens!