title: escape wildcard processing in java classpath
body: <p>Next code prints attributes of each file in current directory because of wildcard processing.  </p>
  
  <pre><code>c:\work&gt;attrib *
  </code></pre>
  
  <p>I need to disable wildcard processing in my script. Escape symbols dont work:  </p>
  
  <pre><code>c:\work&gt;attrib "*"
  c:\work&gt;attrib ^*
  </code></pre>
  
  <p>Both give you the same.  </p>
  
  <p>I need to disable wildcard processing to start my application that accept wildcard as an argument.  </p>
  
  <p>A.java</p>
  
  <pre><code>import java.util.Arrays;
  
  public class A {
  
      public static void main(String[] args) {
          System.out.println(Arrays.deepToString(args));
      }
  }
  </code></pre>
  
  <p>CMD</p>
  
  <pre><code>C:\work\temp&gt;start.bat
  
  C:\work\temp&gt;java -cp playground.jar A *
  [activation.jar, file.txt, playground.jar, playground.jar.bak, start.bat, test.bat]
  
  C:\work\temp&gt;start.bat
  
  C:\work\temp&gt;java -cp playground.jar A "*"
  [activation.jar, file.txt, playground.jar, playground.jar.bak, start.bat, test.bat]
  
  C:\work\temp&gt;start.bat
  
  C:\work\temp&gt;java -cp playground.jar A "* foo? *bar*"
  [* foo? *bar*]
  </code></pre>
  
  <hr>
  
  <p>Found workaround. "*;" - not falid folder name, but valid classpath:</p>
  
  <pre><code>java -cp "*;" A
  </code></pre>
  
  <p>Thanks.</p>