OpenJDK cannot find main class in jar while OracleJDK can
<p>I have the problem, that I cannot run any jars with OpenJDK at all, where as with the normal OracleJDK it is no problem.</p>

<pre><code>OpenJDK # java -version

openjdk version "1.8.0_101"
OpenJDK Runtime Environment (IcedTea 3.1.0) (suse-14.3-x86_64)
OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)
</code></pre>

<p>when I run a jar with this JDK it can never find the main class even tough it is in the manifest.</p>

<hr>

<pre><code>OracleJDK # java -version

java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
</code></pre>

<p>when I launch a jar with this JDK it is no problem. </p>

<p>Do I need to configure something in OpenJDK so it can find the main class from the manifest or what is it that OpenJDK fails to do so?</p>

<h2>Edit:</h2>

<p>Source file structure:  </p>

<pre><code>-- ui  
---- Main.java  
</code></pre>

<p>Gradle build script:</p>

<pre><code>group 'some.group'
version '0.1'

apply plugin: 'java'
apply plugin: 'application'

mainClassName = "ui.Main"

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'org.zeromq', name: 'jeromq', version: '0.3.5'
    compile group: 'org.controlsfx', name: 'controlsfx', version: '8.40.12'

    testCompile group: 'junit', name: 'junit', version: '4.11'
}

jar {
    manifest {
        attributes 'Implementation-Title': 'PlaceholderTitle',
                'Implementation-Version': version,
                'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
                'Main-Class': mainClassName
    }
}
</code></pre>

<p>building with <code>installDist</code></p>

<p>Manifest:</p>

<pre><code>Manifest-Version: 1.0
Implementation-Title: PlaceholderTitle
Implementation-Version: 0.1
Class-Path: jeromq-0.3.5.jar controlsfx-8.40.12.jar
Main-Class: ui.Main
//new line here
</code></pre>