Java NoClassFoundDefError and ClassNotFoundException issue
<p>I just spent two hours reading posts everywhere on the internet talking about this issue, but I haven't one that would have the solution I'm looking for.</p>

<p>I have created a Java application in Eclipse. I exported it as Jar File, Runnable Jar File (I tried all three options : extract required libraries, package required libraries...) and the Jar Files all run fine on my Windows 7 where I developed the application.</p>

<p>I tried using it on another computer I have, with Windows Vista. If I double click the jar file I get an error message saying "Could not find the main class : Golf_Calculator. Program will exit.".
I tried running it with the command, and I get this :</p>

<pre><code>C:\Users\Geoffroy\Desktop\Golf Calculator&gt;java Golf_Calculator.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Golf_Calculator/jar
Caused by: java.lang.ClassNotFoundException: Golf_Calculator.jar
    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)
Could not find the main class: Golf_Calculator.jar.  Program will exit.
</code></pre>

<p>I really don't know what to do.. 
My META-INF folder is in the Jar File and contains the MANIFEST.MF file with the correct Main Class name.
I read that may be it could come from the fact that the classes I import in my code are not in the main directory, but when generating the Runnable Jar File with Eclipse, using the "extract required libraries" option, I thought it would fix the problem. Nope it didn't..
Here are all the imports I do in my code, may be that will give you a hint:</p>

<pre><code>import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Vector;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.Box.Filler;
import javax.swing.event.TableModelListener;
import javax.swing.plaf.ComboBoxUI;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
</code></pre>

<p>I hope that someone out there will be able to help me :)</p>

<p>Thanks a lot!</p>

<p>EDIT : I tried this : java -jar Golf_Calculator.jar and got this :</p>

<pre><code>C:\Users\Geoffroy\Desktop\Golf Calculator&gt;java -jar Golf_Calculator.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: Golf_Calculat
or : 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 java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(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)
Could not find the main class: Golf_Calculator. Program will exit.
</code></pre>
