title: Exception in thread "main" java.lang.NoClassDefFoundError: java/util/function/Predicate
body: <p>I have created a jar file using</p>
  
  <pre><code>mvn assembly:assembly -DdescriptorId=jar-with-dependencies
  </code></pre>
  
  <p>and I run it on windows and it works fine and works as expected. Then I run it on Ubuntu and it gives the following exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: java/util/function/Predicate
  at Maxima_ImageJ.run(Maxima_ImageJ.java:13)
  at Maxima_ImageJ.main(Maxima_ImageJ.java:27)
  Caused by: java.lang.ClassNotFoundException: java.util.function.Predicate
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 2 more
  </code></pre>
  
  <p>I have no idea why it works differently in Windows and Ubuntu. If someone do, please help. Is it related to the versions of java? </p>