title: Cannot execute jar built with gradle with correct Manifest
body: <p>I have a JavaFx application and I cannot run it from both command line and windows explorer.I built the jar using Gradle, and checked for the manifest and it is correct. I tried everything from StackOverflow but it always complains that it cannot find the entry point from Manifest:</p>
  
  <p>My main is located in src/main/java and it is called Main.</p>
  
  <p>Here is the configuration for gradle:</p>
  
  <pre><code>group 'com'
  version '1.0'
  
  apply plugin: 'java'
  apply plugin: 'application'
  
  sourceCompatibility = 1.8
  
  mainClassName = 'Main'
  
  repositories {
      mavenCentral()
  }
  
  jar {
      manifest {
          attributes('Main-Class': 'Main')
      }
      from {
          configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
      }
  }
  </code></pre>
  
  <p>Please ignore the dependecies (I build an uber jar).
  And here is the content of my manifest(created by gradle with the new line at the end):</p>
  
  <pre><code>Manifest-Version: 1.0
  Main-Class: Main
  </code></pre>
  
  <p>When I try to run it i get all the time this:
  Error: Could not find or load main class Main</p>