title: How to use the `Java Options` in jenkins ant build tool to set ANT_OPTS
body: <p>I have a problem with a <code>junit</code> ant build, i'm getting a <code>java.lang.OutOfMemoryError: PermGen space</code> error. </p>
  
  <p>I'm trying to set <code>ANT_OPTS</code> to be <code>ANT_OPTS='-Xmx512m -XX:MaxPermSize=256m'</code> in the build <code>Java Options</code> to increase the heap size ant build tool.
  <img src="https://i.stack.imgur.com/K9DkN.png" alt="enter image description here"></p>
  
  <p>But i get an error each time i run:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: ANT_OPTS=-Xmx512m -XX:MaxPermSize=256m
  Caused by: java.lang.ClassNotFoundException: ANT_OPTS=-Xmx512m -XX:MaxPermSize=256m
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
  Could not find the main class: ANT_OPTS=-Xmx512m -XX:MaxPermSize=256m.  Program will exit.
  </code></pre>
  
  <p>A syntax error ?</p>
  
  <p>Thanks.</p>