title: Jython 2.7.0 UnsupportedClassVersionError during installation
body: <p>After successfully installing jython 2.7.0 on my own computer and writing some code that uses it, I attempted to install it on a server running Ubuntu 14.04.2 LTS. My java version is: </p>
  
  <pre><code>java version "1.8.0_51"
  Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
  Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
  </code></pre>
  
  <p>My error during installation is: </p>
  
  <pre><code>Generating start scripts ...
  Installing pip and setuptools
   90 %
  Exception in thread "main" java.lang.UnsupportedClassVersionError: org/python/util/jython : Unsupported major.minor version 51.0
  </code></pre>
  
  <p>Interestingly, if I run the installation as super user, and then also run the jython executable in the <code>bin</code> directory as super user, it works:</p>
  
  <pre><code>jython-2.7.0/bin$ sudo ./jython 
  Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11) 
  [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_51
  Type "help", "copyright", "credits" or "license" for more information.
  </code></pre>
  
  <p>But if I try to run the jython executable as a normal user (after installing as super user or normal user), then I get the same <code>UnsupportedClassVersionError</code>:</p>
  
  <pre><code>jython-2.7.0/bin$ ./jython 
  Exception in thread "main" java.lang.UnsupportedClassVersionError: org/python/util/jython : Unsupported major.minor version 51.0
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  Could not find the main class: org.python.util.jython.  Program will exit.
  </code></pre>
  
  <p>I checked the java version for both super user and my normal user, and it's exactly the same. Any ideas on what the problem is here?</p>