title: A java exception has occured
body: <p>I've just begun to create a game using Java. Problem, being it will not run due to this error: </p>
  
  <pre><code>Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.maze.game
  at java.lang.ClassLoader.preDefineClass(Unknown Source)
  at java.lang.ClassLoader.defineClass(Unknown Source)
  at java.security.SecureClassLoader.defineClass(Unknown Source)
  at java.net.URLClassLoader.defineClass(Unknown Source)
  at java.net.URLClassLoader.access$100(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
  </code></pre>
  
  <p>It says that a java exception has occurred, but all my other programs will run.
  I've tried:</p>
  
  <ul>
  <li>Uninstalling Java and Re-installing</li>
  <li>Running the most updated Eclipse program (I run Juno)</li>
  </ul>
  
  <p>Here is my code:</p>
  
  <pre><code>package java.maze.game;
  
  import java.awt.BorderLayout;
  import java.awt.Canvas;
  import java.awt.Dimension;
  
  import javax.swing.JFrame;
  
  public class Game extends Canvas implements Runnable {
  
  private static final long serialVersionUID = 1L;
  
  public static final int WIDTH = 160;
  public static final int HEIGHT = WIDTH/12*9;
  public static final int SCALE = 3;
  public static final String NAME = "Maze game";
  
  public boolean running = false;
  
  private JFrame frame;
  
  public Game(){
      setMinimumSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE));   //sets the minimum size of the frame
      setMaximumSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE));   //sets the maximum size of the frame
      setPreferredSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); //sets the preferred size of the frame
  
      frame = new JFrame(NAME);   //creates the frame
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   //set the default for what happens when the program is exited
  
      frame.setLayout(new BorderLayout());    //creating a new layout for the frame
      frame.add(this, BorderLayout.CENTER);   //keeps everything centered not overlapping the taskbar
  
      frame.pack();   //sets the frame above or at the preferred size
      frame.setResizable(false);  //makes sure the user can't resize the frame
      frame.setLocationRelativeTo(null);  //we don't want the location of the screen relative to any variable
      frame.setVisible(true); //sets the frame to visible
  }
  
  public void start() {
      running = true;
      new Thread(this).start(); //whenever the Thread is started it will run the run(); method
  
  }
  public void stop() {
      running = false;
  
  }
  
  public void run() {
      while(running){
          System.out.println("It worked!");
      }
  }
  
  public static void main(String[] args){
      new Game().start();
  }
  }
  </code></pre>
  
  <p>Thank you!</p>
  
  <p><strong>EDIT</strong>
  Feel like an idiot now, but thank you again.</p>