Ray's Tutorial Pages |
Compiled by Ray Ortigas
The Java Development Kit (JDK) is a bare-bones kit that lets you compile and run Java programs. Use your favourite text editor to edit your Java source files and then follow these directions to compile and run your Java programs.
Note: These directions do not take the use of packages into account. If you find yourself needing to know this, e-mail me at rayo@cs.toronto.edu.
The Java compiler, javac, compiles Java source
code (in .java files) into Java byte-codes (in .class files). The
arguments to javac are the .java files you wish to
compile.
For example, if Foo.java contains a class Foo,
then
javac Foo.java
will compile the Foo class as well as any other
classes Foo uses.
To invoke a Java program, you run the Java interpreter, java,
and specify the name of the class that contains the main()
method. This method must have the following signature
(prototype):
public static void main(String[] args)
For example, if Foo.class is the byte-code for a class Foo
which contains a main() method, then
java Foo
will begin the program in the main() method in Foo.
Java WorkShop (JWS) is an integrated development environment (IDE). All this means is that it integrates your development tools (e.g. editor, compiler, debugger, project manager, etc.) into one environment. This integration can be quite convenient.
JWS can be found on both the CDF and CDF-PC workstations.
On a CDF workstation, you can start Java WorkShop (JWS) by typing
jws
at your shell prompt.
On a CDF-PC workstation, you can start Java WorkShop by double-clicking its icon in the Applications group of your Windows NT Start Menu.
| Ray's CSC148H Home Page | Ray's
CSC324H Home Page This page is maintained by Ray Ortigas, a teaching assistant at the Department of Computer Science, University of Toronto. If you have any questions or comments about this page, please send e-mail to Ray at rayo@cs.toronto.edu. Last updated March 21, 1999 09:43. |