The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

a applet is not working in browser(Help me i am struck'd)

i have made a HelloWorld applet(running in appletviewer in EclipseIDE) , now i just wanted to run it from my browser but it is not running.
code as follows.
package com.bhaveshjava.trial;
import java.awt.Graphics;
public class HelloWorld extends java.applet.Applet {
public void init() {
resize(250,250);
}
public void paint(Graphics g) {
g.drawString("Hello world!", 150, 100);
}
}

All the three files Hell.html,HelloMaster.java. HelloMaster.class are in same folder src.com.bhaveshjava.lesson5

before the HelloMaste.class was located in bin.com.bhaveshjava.lesson5 and a Hell.html file was also there with this class file in ./bin

i tried all alternatives but failed, i know there is some logical error...
but as per applet is considered , logically since before only both the class file and html page are in same folder. it is not the matter of output , it is all about logic, which i applied correctly.
Now help me if my approach is wrong

Re: a applet is not working in browser(Help me i am struck'd)

no actually if i remove the package name the code itself is not getting compiled..
but wait i got output when i kept it in a default package...
explain me why i cant put it in a package?
N really thanks for your help.