This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It appears I am getting an error because I do not have a main class but I am not shure, I am doing exactly as the tutorial says is there something I should add. And if it is the main class how and where should I add it.
All help is greatly appreciated,
*added* I think it is the html maybye but I do not know as I have no Idea [ March 28, 2007: Message edited by: Don AnthraX ]
hi, did you compile the code successfully. if so a class file will be generated in the directory where the java file is. In the HTML you have to give the path of the class file or just mention the class file(myapplet.class), if the class file is in the same directory as the HTML page.
The error is because the HTML page could not fine the required class file.
On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.
As to your question, first thing is to make sure that Java in installed correctly in your browser. See if you can run any applets from this page. If you can, then the code you poasted should work, provided you have the myapplet.class file in the same directory as the HTML file.
No further class (named "main" or otherwise) is needed.