Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Related items

Steps to Java Internationalization (i18n)

Java Applets in Education

Java #6 I Wanna hold your hand - longer

Mouse Event Handling in Java 1.0

Java #5 I Wanna hold your hand

Java Applets #4

Java Applets #3

Java Applets #1

Java Applets #2- compile

You are here: irt.org | Articles | Java | Java Applets #2 [ previous next ]

Published on: Saturday 21st March 1998 By: Tarique Sani

Editing

The source code for your applet must be contained in a text file whose name is same as that of your applet class and the extension of this file must be .java. Thus for our example the file name would be "Simple.java". Remember - these names are case sensitive.

Compiling

Once you have got your source file ready you can compile it by running the java compiler, from a DOS window or an Xterm window depending upon your OS. The command is as follows:

javac Simple.java

If there are any mistakes in your source code the compiler will point it out.

Running

You can run your applet in any of the following ways

Execute - appletviewer Simple.java (This will work only if you included the default HTML in your source code)

Execute - appletviewer Simple.html (The HTML file with the relevant <applet> declaration).

Open the Simple.html document in a java compatible web browser.

Related items

Steps to Java Internationalization (i18n)

Java Applets in Education

Java #6 I Wanna hold your hand - longer

Mouse Event Handling in Java 1.0

Java #5 I Wanna hold your hand

Java Applets #4

Java Applets #3

Java Applets #1

©2018 Martin Webb