Applet wont run in eclipse Ubuntu [message #826222] |
Wed, 21 March 2012 20:29 |
Wikki Latef Messages: 1 Registered: March 2012 |
Junior Member |
|
|
Hey everyone
I am new here and I am a student. our teacher started teaching us applet programming but the applet wont run on my laptop i have ubuntu. the code is fine because the same code runs on windows and mac computers. I did install sun java 1.6 something and i had the other java install too the OpenJDK and the IcedTea java. i used the option in terminal to switch java and to use the sun java. I also went to the preferences of eclipse and tried using all the jdk's that were available but none of them work.
here is my code if you wana see it
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
public class SmileyOut extends Applet
{
public void paint(Graphics page)
{
setSize(500,500);
setBackground (Color.blue);
page.setColor(Color.yellow);
page.drawString("sup" , 50, 50);
page.fill3DRect(65,65,40,80, true);
}
}
these are the errors i get
Quote:load: class SmileyOut$drawstuff.class not found.
java.lang.ClassNotFoundException: SmileyOut$drawstuff.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:219)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:152)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:633)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:797)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:726)
at sun.applet.AppletPanel.run(AppletPanel.java:379)
at java.lang.Thread.run(Thread.java:722)
and i apologize if i posted this thread in the wrong place.
[Updated on: Wed, 21 March 2012 20:30] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02660 seconds