|
|
Here are some links which you may find useful.
|
| |
|
Since
Java files are really text files which are compiled into bytecode
and run by the Java Virtual Machine (JVM), there are several
options for writing your programs this semester. Remember that
links to other Useful Downloads (e.g.,
programming editors, Telnet clients) and Unix
Information and Editors are located on the Resources page.
- The
easiest way is to use a basic text editor to write your
Java programs, then transfer files to the FAS system using
an FTP program, connect through telnet, and compile and
run them on FAS (fas.harvard.edu - Java is already
installed there). They MUST be on FAS in order to submit
them for your homework. To use this method, you may
want to learn enough about one of the Unix text editors
to be able to make any needed quick corrections to your
files, or plan to update the file locally and re-transfer
it. More information about transferring files is on the FAQ
page.
DO NOT use a word processor, e.g. Word or
WordPerfect! They add lots
of formatting characters which you don't see,
but which will prevent your programs from ever
compiling. On Windows, you may use Notepad or
Wordpad and make sure you save the files as "Text
Document" with
the .java extension. If the system tries to add
a ".txt" suffix, put quotes around
your file name and extension in the Save box
to prevent this. You may also try any of the
editors in the Useful
Downloads section (one we highly recommend
for PC's is Programmers File Editor). On the
Mac, use BBEdit Lite (also linked on the Resources
page), or one of the built-in Unix editors which
are available in a Terminal window.
- You
can obtain a secure telnet program or use one that you
have, telnet into the FAS system, and write and edit your
programs on the system. There are three Unix
editors which you may try: pico, emacs, and vi. Once
you've written your program and saved it, then, as above,
you can compile and run it on FAS.
- You
can choose to work on your own computer at home. If you
wish to do this, you will need a text editor to write the
programs (see info above under #1), as well as a JVM (Java
Virtual Machine) to compile and run them. Thus, you will
need to download and install the SDK from Sun, linked below.
You still must upload and run your
programs on FAS to submit them for homework.
Once you've typed in and saved your program,
you will need to compile and run it in a command
line window. You can get one on a PC by clicking
START, then Run, and in the box typing 'command' (no
quotes). If you are using PFE, there is a button
along the top row with a DOS prompt displayed
which will open a command window for you. On
a Mac, use the Terminal program (located in the Utilities folder
under Applications). In the command window, navigate to the
directory in which your files are stored, and you should be
able to compile and run them there. Here is some basic
DOS info (http://www.jegsworks.com/Lessons/reference/doscommands.htm).
- We
do not recommend the use of an IDE like Eclipse, NetBeans,
or others during this coursel - you need to learn how
to write your own code and tweak it to do what is needed,
so you'll be able to manage this when an IDE doesn't
quite get it right.
NOTE: Since we have provided you with Harvard accounts
to use for programming, the course staff will NOT be able
to provide tech support for the various IDE's.
|
| RETURN
TO TOP |
| |
|
JAVA
Development Kits:
In order to run Java programs on your own computer (PC), you will need
to download and install a Java Software Development Kit (NOT just the Java
Runtime Environment, or JRE, which your computer may already have). This
contains all the Java built-in libraries that your programs will need to
access.
The JDK is the nuts and bolts of Java; you may also see it referred to
as the SDK (Software Development Kit) or J2SE (Java 2 Standard Edition).
The JRE (Java Runtime Environment) allows Java classes to run, but does
NOT allow programming and compiling. The newest JDK version is 1.5, and
you will need this version for the course. The links below will allow you
to download and install the free SDK.
If you have Mac OS X, Java is pre-installed on your computer. You
may check the version by opening a Terminal window (found in Applications
/ Utilities), typing "java
-version", and then hitting Return. If you do not have Java
5.0, you will need to upgrade to both Tiger (OS X 10.4) and then install
Java 5.0 (follow the links to Java downloads and J2SE 5.0).
Linux/Unix users may also already have the SDK installed; if not, use
the non-Macintosh link.
Windows users may follow the links below to download and install
the software. |
NON-MACINTOSH:
|
MACINTOSH:
Macs
will already have Java installed - please be sure
your Software Updates are current. You will probably
not need the info linked below, but for some of you
with more Unix background, it's included.
|
| RETURN
TO TOP |
|