title: Executing Jar with "java -jar executable.jar" is OK but even with execution permission, "./executable.jar" returns a "Bad Magic Number"
body: <p>I have a small application that I build with maven : </p>
  
  <pre><code>            &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;mainClass&gt;be.scripts.batchconverter.MainScript&lt;/mainClass&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;create-executale-jar&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;single&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;finalName&gt;batchconverter&lt;/finalName&gt;
                          &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                          &lt;descriptorRefs&gt;
                              &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                          &lt;/descriptorRefs&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I can run it with "java -jar batchconverter", but when I try to execute it with "chmod +x batchconverter.jar" and then "./batchconverter.jar", I got this generic error : </p>
  
  <pre><code>invalid file (bad magic number): Exec format error
  </code></pre>
  
  <p>My JDK is oracle, "1.8.0_121", I have binfmt-support installed, and I'm running an ubuntu 16.04</p>
  
  <p>Here is the manifest :</p>
  
  <pre><code>Manifest-Version: 1.0
  Archiver-Version: Plexus Archiver
  Built-By: jschoreels
  Created-By: Apache Maven 3.3.9
  Build-Jdk: 1.8.0_121
  Main-Class: be.scripts.batchconverter.MainScript
  </code></pre>
  
  <p>And the ls result (to prove the x permission)</p>
  
  <pre><code>-rwxrwxr-x 1 jschoreels jschoreels 4,9M Mär  7 11:40 batchconverter.jar
  </code></pre>
  
  <p>Any idea to determine the cause ?</p>