title: How to access a executable file in jar
body: <p>my project folder is like </p>
  
  <pre><code>├── bin
  │   ├── org...
  │   └── resources
  │       └──driver
  ├──src
  │   └──org...
  └── resources
      └──driver
  </code></pre>
  
  <p>...</p>
  
  <p>where driver is an excitable file.
  How can I use that program in my java project, especially when I export it as a JAR?</p>
  
  <p>I tried</p>
  
  <pre><code>...
  java.net.URL driverURL = this.getClass().getResource("/resources/driver");
  cmd[0] = driverURL.toString();
  process = Runtime.getRuntime().exec(cmd);
  </code></pre>
  
  <p>But it won't work.</p>
  
  <p>I read about some articles saying how to access resources using inputStream, but I wonder how to access an executable file?</p>