title: Error: Could not find or load main class cucumber.api.cli.Main
body: <p>I try to run this gradle task </p>
  
  <pre><code>task runCucumber(type: JavaExec) {
      main = "cucumber.api.cli.Main"
      args += ['-f', 'html:build/reports/cucumber/', '-f', 'json:build/reports/cucumber/report.json', '--glue', 'com.waze.testing.cucumber', 'src/main/resources/features'
               , '--tags', '~@ignore', '--tags', '~@preRelease', '--tags', '@advil']
      systemProperties['http.keepAlive'] = 'false'
      systemProperties['http.maxRedirects'] = '20'
      ignoreExitValue = true
  }
  </code></pre>
  
  <p>and get this error:</p>
  
  <p><code>Error: Could not find or load main class cucumber.api.cli.Main</code></p>
  
  <p>why is that? I can find it in the included cucumber jar.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I already have this task that runs successfully:</p>
  
  <pre><code>mainClassName = "cucumber.api.cli.Main"
  
      run {
          args += ['-f', 'html:build/reports/cucumber/', '-f', 'json:build/reports/cucumber/report.json', '--glue', 'com.waze.testing.cucumber', 'src/main/resources/features'
                   , '--tags', '~@ignore', '--tags', '~@preRelease']
          systemProperties['http.keepAlive'] = 'false'
          systemProperties['http.maxRedirects'] = '20'
      }
  </code></pre>