HOw to run the Applet in dos mode

how to run the applet in Command Prompt(DOS).

I have save this in directory D/vijay/javap/A.java and my JDK is in C drive.

Plz send me reply as soon as possible.

My code is :-

import java.applet.*;

import java.awt.*;

public class A extends Applet

{

private int w, h;

public void init( )

{

w = 45;

h = 50;

}

public void paint(Graphics g)

{

g.drawRect(w, h, 20, 80);

}

}

[487 byte] By [VijayNandana] at [2007-11-27 10:22:30]
# 1

The command appletviewer. Located in the same directory as javac.

masijade.a at 2007-7-28 17:16:26 > top of Java-index,Java Essentials,Java Programming...
# 2

import java.applet.*;

import java.awt.*;

public class A extends Applet

{

private int w, h;

public void init( )

{

w = 45;

h = 50;

}

public void paint(Graphics g)

{

g.drawRect(w, h, 20, 80);

}

}

/*

<applet class="A" height="200" width="200" code="A.class">

</applet>

*/

And in command prompt

javac A.java

appletviewer A.java

Message was edited by:

passion_for_java

passion_for_javaa at 2007-7-28 17:16:26 > top of Java-index,Java Essentials,Java Programming...