University of Delaware

Java

Contents

Description

Java is an operating system independent platform for computing. It consists of a programming language, utility programs and a run time environment. A Java program can be developed on one computer and run on any other computer with the correct run time environment. Usually older java programs can run on newer run time environments. Java is rich enough that even very complicated applications can be written with no operating system dependencies, and this is call 100% java.

Since the development of the Web, Java has gained in popularity, since the programmer does not know which system the user may be on. There are several ways Java can be used with a web applications.

applet
An applet is a Java object designed to be in embedded in a web page. The applet is run when when the web page is openned, and the applet displays in the area of the page set aside by the applet tag. The Java run time environment is on the same machine as the web browser.
servlet
Web servers can call a Java program called a servlet. The servlet produces html which any web browser can display. The Jave run time environment is on the same machine as the web server.
webstart
The standard Java installation from Sun has a program called javaws which will start a java application delivered from a web page. The delivered web file is an XML file which has all the need information to start and install the webstart applications.

A Java program which can be run from the command line is called a Java applicatoin

Contents

Where to Find Java

Contents

Java Instructions

Contents

More Help

There are many tutorials on Java programming and many resources on using Java on the Web.

If you need help quickly, you may call the IT Help Center at 831-6000 between 8 a.m. and 5 p.m., Monday through Friday. Or, you can submit a question through e-mail.

For help in programming you should start by looking at the demo Java programs that come with the Java Development Kit, jdk. These demo examples come with Java source files and instructions on how to run them. There are several versions of jdk on Strauss. To get a listing of all the demo directories type the command

ls /usr/jdk*/demo

The examples in the applet directory are written as an applet to be displayed in a browser. There is always an html file which you can use to start the applet. You can try any applet example. For example to run the DrawTest demo applet:

netscape /usr/jdk1.2.2/demo/applets/DrawTest/example1.html

you can also uses appletviewer or iexplorer as your browser. We do not recommend Internet Explorer, iexplorer, on Unix.

If you want to run the Swing examples, in the jfc directory, you will need to use the Applet Viewer, since Netscape's java does not support Swing. For example, to run the Java2Demo Swing applet.

appletviewer /usr/jdk1.2.2/demo/jfc/Java2D/Java2Demo.html

If you try this with Netscape you will get the following error in Netscape's Java Console.

   # Applet exception: error: java.lang.NoClassDefFoundError: javax/swing/JApplet

Contents

IT Help Center
Questions or Comments
University of Delaware Home Page
Last updated: April 14, 2005
Copyright © 2001-2005 University of Delaware