Hi all,
i want to ask u guys what else i need to do to run this code?
i have JDK. i have these file in my c:/program files/java/jdk1.6.0_16
c:/program files/java/jdk1.6.0_18 c:/program files/java/jre6.


if i want to run this code,what do i need to do?

import java.awt.graphics;

class HelloWorldApplet extends java.applet.Applet
{
	public void paint(Grphics g)
	{
		g.drawingString("Hello World!!!",5,25);
	}
}

do i need to save the helloworld file inside c:/program files/java ?

im a new leaner...im reading a book teach yourself java in 21 days.but a bit conufse about the compiler or interpreter...

:'(

1. If teach yourself java in 21 days telling you to save things in installation of Java throw in the bin. If it was your idea smack your self on hand. Do not mess with installation.
2. Check if you have Java Path set in your environment variables otherwise you will need to prove this path every time you compile (Java installation instructions and how to check it)
3. You need to be more careful with spelling Grphics != Graphics

1. If teach yourself java in 21 days telling you to save things in installation of Java throw in the bin. If it was your idea smack your self on hand. Do not mess with installation.
2. Check if you have Java Path set in your environment variables otherwise you will need to prove this path every time you compile (Java installation instructions and how to check it)
3. You need to be more careful with spelling Grphics != Graphics

yes i have make typo error. first,to compile the code,i need to set path the compiler. thats i have learnt juz now, but for applet i still dont have an idea.thats y i post this thread so that sumone could tell and discuss with me what i need to have so that my code can be run.
what is the rules to run Java Applet.i can run using the programming tool but i still dont know how its run and what makes it run.

if i want to run this code,what do i need to do?

import java.awt.Graphics;

class HelloWorldApplet extends java.applet.Applet
{
	public void paint(Graphics g)
	{
		g.drawString("Hello World!!!",5,25);
	}
}

:'(

Editted

book originates with Java 1.1 I think, but may have had superficial updates over the last decade or so (like changing a few version numbers).

Hi all,
i want to ask u guys what else i need to do to run this code?
i have JDK. i have these file in my c:/program files/java/jdk1.6.0_16
c:/program files/java/jdk1.6.0_18 c:/program files/java/jre6.


if i want to run this code,what do i need to do?

import java.awt.graphics;

class HelloWorldApplet extends java.applet.Applet
{
	public void paint(Grphics g)
	{
		g.drawingString("Hello World!!!",5,25);
	}
}

do i need to save the helloworld file inside c:/program files/java ?

im a new leaner...im reading a book teach yourself java in 21 days.but a bit conufse about the compiler or interpreter...

:'(

we have to save it "bin" directory of JDK.and run it using AppletViewer

Comments
You do not mess with Java installation, NEVER!
This question has already been answered. Start a new discussion instead.