title: java: NoClassDefFoundError when running from terminal but not from netbeans
body: <p>I'm seeing weird behavior when I try to run my jar file. I can run and execute my java app from netbeans without any problem. But when I tried to run the jar file from terminal I'm getting a <code>NoClassDefFoundError</code> exception in some java classes.</p>
  
  <p>stacktrace:</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class java.nio.file.TempFileHelper
  at java.nio.file.Files.createTempFile(Files.java:805)
  at sun.font.FcFontConfiguration.writeFcInfo(FcFontConfiguration.java:391)
  at sun.font.FcFontConfiguration.init(FcFontConfiguration.java:100)
  at sun.font.FcFontConfiguration.&lt;init&gt;(FcFontConfiguration.java:75)
  at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:747)
  at sun.font.SunFontManager$2.run(SunFontManager.java:431)
  at java.security.AccessController.doPrivileged(Native Method)
  at sun.font.SunFontManager.&lt;init&gt;(SunFontManager.java:376)
  at sun.awt.X11FontManager.&lt;init&gt;(X11FontManager.java:32)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
  </code></pre>
  
  <p>Passing he verbose argument to java, I can see <code>java.nio.file.TempFileHelper</code> loaded.</p>
  
  <p>im running my app in linux (Fedora 20)</p>
  
  <p>Excerpt: <code>[Loaded java.nio.file.TempFileHelper from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.0.fc20.x86_64/jre/lib/rt.jar]</code></p>
  
  <p>verbose log: <a href="http://pastebin.com/ekuQfkgG" rel="nofollow">http://pastebin.com/ekuQfkgG</a></p>
  
  <p>What can I do?</p>
  
  <p>EDIT:
  running my app using the same java interpeter used to compiled the app works:</p>
  
  <pre><code> /usr/java/jdk1.7.0_60/jre/bin/java -jar InstaladoruraClientes/Cliente.jar 
  </code></pre>