Hi everybody
I was trying an applet program........it gets compiled but i am not able to run it.............
i am sending u the code and the error mess. i got in comdprompt
my code is
import java.awt.*;
import java.applet.*;
public class Project1 extends Applet
{
public void paint (Graphics g)
{
g.setColor(Color.yellow);
g.fillRect(0,0,300,300);
g.setColor(Color.orange);
g.fillOval(230,50,50,70);


}
}
my html file code is
<html>
<head>
<title>Project1</title>
</head>
<body>
<center>
<applet "code=Project1.class" width=500 height=500>
</applet>
</center>
</body>
</html>
and these are the error messages:
D:\j2sdk1.4.2_08\bin>javac Project1.java

D:\j2sdk1.4.2_08\bin>java Project1
Exception in thread "main" java.lang.NoSuchMethodError: main

D:\j2sdk1.4.2_08\bin>set CLASSPATH=D:\j2sdk1.4.2_08\bin

D:\j2sdk1.4.2_08\bin>appletviewer Project1.html
load: class Project1.class" not found.
java.lang.ClassNotFoundException: Project1.class"
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:162)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:566)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:619)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:548)
at sun.applet.AppletPanel.run(AppletPanel.java:299)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.FileNotFoundException: D:\j2sdk1.4.2_08\bin\Project1\class".class (The system cannot find the path sp
ecified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.net.http://www.protocol.file.FileURLConn...ection.java:69)
at sun.net.http://www.protocol.file.FileURLConn...ction.java:156)
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:274)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:43)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:152)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:149)

Plz help me out
Thanx in Advance
Neer