4 Replies - 1069 Views - Last Post: 07 July 2007 - 11:32 PM

#1 Israel   User is offline

  • D.I.C Addict
  • member icon

Reputation: 7
  • View blog
  • Posts: 833
  • Joined: 22-November 04

Compiler won't compile applet (Configuration Errors)

Posted 05 July 2007 - 10:32 PM

Ok I don't this is my code, but here it is for good measure:

import java.applet.*;
import java.awt.*;

public class game2 extends Applet implements Runnable {

	int x_pos = 10;
	int y_pos = 100;
	int radius = 20;

	 public void init(){}
	 public void start()
	 {
		 //define a new thread
		 Thread th = new Thread (this);
	 }
	 public void stop(){}
	 public void destroy(){}
	 public void run()
	 {


	 // lower ThreadPriority
	 Thread.currentThread().setPriority(Thread.MIN_PRIORITY);

	 // run a long while(true) this means in this case "always"
	 while(true)
		{
			// changing the x - position of the ball/circle
			x_pos ++;


			// repaint the applet
			repaint();
			try{
				// Stop thread for 20 milliseconds
				Thread.sleep(20);
			   }
			catch(InterruptedException ex)
			{/* Do nothing*/}

			//set ThreadPriority to maxium value
			Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
		}

	 }
	 public void paint(Graphics g)
	 {
	   // set color
	   g.setColor(Color.red);

	   // paint the colored circle
	   g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius);

	 }
}



When I try to run this I get a message saying "Unable to start runtime due to incomplete configuration"?

Is This A Good Question/Topic? 0
  • +

Replies To: Compiler won't compile applet (Configuration Errors)

#2 1lacca   User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Compiler won't compile applet (Configuration Errors)

Posted 06 July 2007 - 02:10 AM

Wrong forum.
Other than that, I think it is more likely a JDK/IDE configuration issue (can you compile other things?)
Was This Post Helpful? 0
  • +
  • -

#3 Israel   User is offline

  • D.I.C Addict
  • member icon

Reputation: 7
  • View blog
  • Posts: 833
  • Joined: 22-November 04

Re: Compiler won't compile applet (Configuration Errors)

Posted 06 July 2007 - 05:55 PM

I forgot this is with Borland JBuilder 2005 Compiler. That's why I posted it under Software.

Yes, I can compile other programs just fine. I've even done one or two applets in the past, but for some reason I'm getting this now...?
Was This Post Helpful? 0
  • +
  • -

#4 1lacca   User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Compiler won't compile applet (Configuration Errors)

Posted 07 July 2007 - 03:23 AM

Can you compile and run those applets now?
Maybe you've upgraded your SDK or something else, that the GUI didn't notice?
Was This Post Helpful? 0
  • +
  • -

#5 Israel   User is offline

  • D.I.C Addict
  • member icon

Reputation: 7
  • View blog
  • Posts: 833
  • Joined: 22-November 04

Re: Compiler won't compile applet (Configuration Errors)

Posted 07 July 2007 - 11:32 PM

Well, I did recently try to add a package to the libraries but it never took? I just tried to go in and delete that package but I can't seem to get back to where I opened that containing folder up? Thanks for jogging my memory though, I don't know if that's where my problem lies, but I do need to take care of that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1