title: Using wildcards in java classpath
body: <p>I am running a shell script that is supposed to execute a <code>main</code> method:</p>
  
  <pre><code>java -classpath /path/to/app/conf/lib/nameJar* com.example.ClassTest
  </code></pre>
  
  <p>In this point I get this exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
  Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
          at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
  </code></pre>
  
  <p>This is because the spring jars are located in another folder. SO I have changed  the script:</p>
  
  <pre><code>java -classpath /path/to/app/conf/lib/nameJar*:/path/to/app/lib/spring* com.example.ClassTest
  </code></pre>
  
  <p>But with this script, the com.example.ClassTest can not be found. Any ideas about this issue?</p>
  
  <p>Thanks in advance</p>