title: Open a PowerPoint file contained in a JAR file
body: <p>One of my resource files is a PowerPoint presentation and I want to open the presentation with PowerPoint. If I run the code in Eclipse everything works fine but if I run the executable .jar with <code>java -jar jarname.jar</code>, PowerPoint says it can not read the file.</p>
  
  <p>Is it possible to read packed resource files? Or is only the executing jar able to read these files? If so what would you do? Write the file in a temp folder?</p>
  
  <p>Absolute path to presentation if I run in eclipse:</p>
  
  <p><code>C:\Users\RPR\workspace\CommandLineExecuter\bin\blaa.pptx</code></p>
  
  <p>Absolute path to presentation if I run the executable jar:</p>
  
  <p><code>C:\Users\RPR\workspace\CommandLineExecuter\file:\C:\Users\RPR\workspace\CommandLineExecuter\CommandLineExecuter.jar!\blaa.pptx</code></p>
  
  <p>PowerPoint is not able to read the file even if I hardcode the path to <code>C:\Users\RPR\workspace\CommandLineExecuter\CommandLineExecuter.jar!\blaa.pptx</code></p>
  
  <p>Code where I load the resource:</p>
  
  <pre><code>File presentation = new File(CommandLineExecuter.class.getResource(
          "/blaa.pptx").getFile());
  
  ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c",
          "cd &amp; \"C:\\Program Files\\Microsoft Office\\Office15\\POWERPNT.exe\ "
                  + presentation.getAbsolutePath());
  </code></pre>