title: Jar built in windows does not run in linux
body: <p>I know that there are a lot of posts on SOF regarding this same topic , but I feel my problem is a little different.</p>
  
  <p>I have a maven based java project which uses javaFx . Need to create an executable jar file and run it from the command line or on double click of the jar file.</p>
  
  <p>This is how I build it , the relevant portion of my pom.xml file is this </p>
  
  <pre><code> &lt;plugin&gt;
      &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;descriptorRefs&gt;
            &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
          &lt;/descriptorRefs&gt;
          &lt;archive&gt;
            &lt;manifest&gt;
             &lt;addClasspath&gt;true&lt;/addClasspath&gt;
              &lt;mainClass&gt;com.sumanta.MyMain&lt;/mainClass&gt;
            &lt;/manifest&gt;
  
            &lt;manifestEntries&gt;
             &lt;Class-Path&gt;./&lt;/Class-Path&gt;
            &lt;/manifestEntries&gt;
          &lt;/archive&gt;
        &lt;/configuration&gt;
     &lt;/plugin&gt;
  </code></pre>
  
  <p>I then use maven to build the executable jar using this </p>
  
  <p>clean compile assembly:single</p>
  
  <p>I am using eclipse IDE .</p>
  
  <p>The jar file that is created runs on windows 8 on double click and from the command line.</p>
  
  <p>Now I need this to run on ubuntu linux as well . I have Open JDK 8 installed my linux installation but when I double click on the jar file nothing happens.</p>
  
  <p>Then I open up the terminal and give this command </p>
  
  <pre><code>  java -jar myExecutableJarFile.jar
  </code></pre>
  
  <p>I am getting this error </p>
  
  <pre><code>  Error: Could not find or load main class com.sumanta.MyMain
  </code></pre>
  
  <p>It seems to be a problem with the manifest file . This file lists the proper name along with the full package path of the class which contains the  main method</p>
  
  <pre><code>Manifest-Version: 1.0
  Archiver-Version: Plexus Archiver
  Created-By: Apache Maven
  Built-By: Ayan
  Build-Jdk: 1.8.0_71
  Main-Class: com.sumanta.MyMain
  Class-Path: ./
  </code></pre>
  
  <p>What is wrong with this setup . I need the application to run on windows , linux , and mac OS. I suppose since mac and linux are unix type Os , if the application runs on linux it will run on mac os as well .</p>