title: Error: A JNI error has occurred, please check your installation and try again. Using Eclipse, TestNG
body: <p>Using Eclipse on Mac OS, I'm trying to run simple code to test one testNG code(later to use with Jenkins):</p>
  
  <pre><code>package demoJenkins;
  
  import org.junit.Test;
  
  public class DemoJenkinsJobs {
  
  @Test
  
  public void testJenkins(){
  
      System.out.println("Welcome to Jenkins world");
  
  }
  
  }
  </code></pre>
  
  <p>First I convert it to TestNG then I run the testing.xml as TestNG, but every time I try I get this error(I already added jcommander.jar and bash-1.3.0.jar):</p>
  
  <pre><code>Error: A JNI error has occurred, please check your installation and 
  try again
  Exception in thread "main" java.lang.NoClassDefFoundError: 
  org/testng/TestNGException
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
  at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
  at java.lang.Class.getMethod0(Class.java:3018)
  at java.lang.Class.getMethod(Class.java:1784)
  at 
  sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
  at 
  sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
   Caused by: java.lang.ClassNotFoundException: 
  org.testng.TestNGException
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  ... 7 more
  </code></pre>