title: Java 8 .jar file won't run from desktop using Netbeans 8.0.2 to compile WITH EXTERNAL LIBRARY; runs fine if library is included in source
body: <p><strong><em>EDIT</em></strong></p>
  
  <p>The <strong>jar file now runs from the desktop</strong> after clean and build and copying it there <strong><em>BUT</em></strong> to make it happen I had to <strong>delete the external library</strong> containing <code>Utilities.jar</code> and include the source as another java class.</p>
  
  <p><strong>This isn't acceptable</strong> but maybe it tells what to do to make the problem below go away.</p>
  
  <p>When compiling with external library containing <code>Utilities.jar</code>, I find a <code>lib</code> folder inside the <code>dist</code> folder, and inside it is <code>Utilities.jar</code>.</p>
  
  <p>The <code>Readme.txt</code> file in the <code>dist</code> folder says:</p>
  
  <pre><code>        ======================== BUILD OUTPUT DESCRIPTION =====
  
          When you build an Java application project that has a main class, the IDE
       automatically copies all of the JAR files on the projects classpath to your
       projects dist/lib folder. The IDE also adds each of the JAR files to the 
      Class-Path element in the application JAR files manifest file (MANIFEST.MF).
  
          To run the project from the command line, go to the dist folder and 
      type the following:
  
          java -jar "MrCopy.jar" 
  
          To distribute this project, zip up the dist folder (including the 
      lib folder) and distribute the ZIP file.
  
          Notes:
  
          * If a library on the projects classpath also has a Class-Path element 
          specified in the manifest, the content 
          of the Class-Path element has to be on the projects runtime path. 
  </code></pre>
  
  <p>Here's what's in <code>manifest.mf</code>:</p>
  
  <pre><code>Manifest-Version: 1.0
  X-COMMENT: Main-Class will be added automatically by build
  </code></pre>
  
  <p>Should I add anything to it?</p>
  
  <p>If I follow the advice in the <code>readme</code> and "zip up the .jar and <code>lib</code> folder" and put the <code>.zip</code> folder on the desktop and unzip it and run the .jar file, the program runs normally, as it should.</p>
  
  <p>And if I run from command line from the <code>dist</code> folder via <code>javac -jar mrcopy.jar</code>, it of course runs right.</p>
  
  <p>But I've never had to go through all this just to get an executable .jar file.</p>
  
  <p>I'm so confused.................</p>
  
  <p><strong>Is it just this simple:
  If I have external libraries, I'm going to have to zip them up, distribute the zip, unzip the zip and run the .jar file from wherever it got unzipped to?</strong></p>
  
  <p><strong>End of edit</strong></p>
  
  <p>For years, after modifying and compiling <code>MrCopy.jar</code>, I could copy the .jar file (that is found in the <code>...\NetBeansProjects\MrCopy\dist</code> folder) to my desktop and run it. Here's what SHOULD happen:</p>
  
  <p><a href="https://i.stack.imgur.com/2bbUv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2bbUv.png" alt="enter image description here"></a></p>
  
  <p>That dialog pops up and clicking YES leads to copying and the screen below at end:</p>
  
  <p><a href="https://i.stack.imgur.com/j8V1s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j8V1s.png" alt="enter image description here"></a></p>
  
  <p>But now that I'm compiling (as of today) using <code>JAVA 8</code> in Project Properties <code>Source\Binary format</code>, I don't get the first dialog and nothing happens.</p>
  
  <p>Here's what Project Properties Packaging looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/chPzS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/chPzS.png" alt="enter image description here"></a></p>
  
  <p>What can I do to make .jar file run from desktop?</p>