title: Main-Class has defined in MANIFEST.MF, but still can't find main class error
body: <p>I build a jar file with Intellij IDEA 2019.1.3. It's a very simple Helloworld project. But once i use <code>java jar xxx.jar</code>, an error happened: <code>Can not find or load main class</code>.
  But i have defined main class.
  Here is the content in my META-INF/MANIFEST.MF file:</p>
  
  <pre><code>Manifest-Version: 1.0
  Class-Path: .
  Main-Class: apk.Main
  
  </code></pre>
  
  <p>And here is my jar file structure:</p>
  
  <pre><code>-apk
  --Main
  -META-INF
  --MANIFEST.MF
  --abc.kotlin_module
  </code></pre>
  
  <p>My <em>build.grale</em> file as below:</p>
  
  <pre><code>plugins {
      id 'org.jetbrains.kotlin.jvm' version '1.3.31'
  }
  
  group 'abc'
  version '1.0-SNAPSHOT'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
  }
  
  jar {
      manifest {
          attributes (
                  "Class-Path": ".",
                  "Main-Class": "apk.Main"
          )
          /*from {
              configurations.dependencies.collect { it.isDirectory() ? it : zipTree(it) }
          }*/
      }
  }
  
  compileKotlin {
      kotlinOptions.jvmTarget = "1.8"
  }
  compileTestKotlin {
      kotlinOptions.jvmTarget = "1.8"
  }
  </code></pre>
  
  <p>It seems everything is ok in this jar. But what is wrong with my jar?</p>