title: java.lang.reflect.InvocationTargetExpection
body: <p>I am having trouble with running Java Applet on site. Applet itself runs localy ok from jar file and there are no errors or warning when compiling it. I even succeselfully signed it, but when I try to run it from website I always get java.lang.reflect.InvocationTargetExpection . Any ideas what I am doing wrong? Heres the applet source code:</p>
  
  <pre><code>    import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import java.io.*; 
  public class test {
  
      private static void createAndShowGUI()  {
  
          JFrame frame1 = new JFrame("JAVA");
          frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          JButton button = new JButton(" Remote Desktop &lt;&lt;");
          //Add action listener to button
          button.addActionListener(new ActionListener() {
  
              public void actionPerformed(ActionEvent e)
               { 
                  try   {
                  Process p = Runtime.getRuntime().exec("C:\\Windows\\System32\\mstsc.exe"); //calls cmd.exe and prints hello world to console
                  BufferedReader in = new BufferedReader( 
                  new InputStreamReader(p.getInputStream())); 
                  String line = null; 
                  while ((line = in.readLine()) != null) { 
                  System.out.println(line); 
                  } 
                  } catch (IOException l) { 
                  l.printStackTrace(); 
                  } 
               }
  
          });      
  
          frame1.getContentPane().add(button);
          frame1.pack();
          frame1.setVisible(true);
      }
  
  
      public static void main(String[] args) {
          javax.swing.SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                  createAndShowGUI();
              }
          });
      }
  }
  </code></pre>
  
  <p>And here output from jave console:</p>
  
  <pre><code>java.lang.UnsupportedClassVersionError: button : Unsupported major.minor version 51.0
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(Unknown Source)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Exception: java.lang.UnsupportedClassVersionError: button : Unsupported major.minor version 51.0
  </code></pre>