Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Applet wont run in eclipse Ubuntu
icon4.gif  Applet wont run in eclipse Ubuntu [message #826222] Wed, 21 March 2012 20:29 Go to next message
Wikki Latef is currently offline 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

Re: Applet wont run in eclipse Ubuntu [message #826473 is a reply to message #826222] Thu, 22 March 2012 05:32 Go to previous message
Satyam Kandula is currently offline Satyam Kandula
Messages: 444
Registered: July 2009
Senior Member
It is looking for a inner class drawstuff in SmileyOut. Try to understand if that is expected and if so there are no problems with the case.
Previous Topic:Java Code Compile
Next Topic:Eclipse Error
Goto Forum:
  


Current Time: Sat Sep 20 14:00:17 GMT 2014

Powered by FUDForum. Page generated in 0.07576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software