title: IntelliJ IDEA - mysql in artifact (JAR) missing
body: <p>So.. this is driving me nuts. Day 2 of trying to get mysql working on Java and it's still not working.</p>
  
  <p>I'm developing a Java application on Windows using IntelliJ IDEA (latest version), exporting it as JAR (Build artifact) and running it on a Ubuntu server.</p>
  
  <p>Choosing Run in IDEA (Windows) causes the library (<strong>mysql-connector-java-5.0.8</strong>) to be included, as the program cannot find the database.
  However, when I upload the JAR (artifact), I'm getting:</p>
  
  <pre><code>java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
  </code></pre>
  
  <p>I've tried just about anything, and after spending almost 16 hours on this, I'm out of options and getting really frustrated. I've read most of the posts here and tried all of them, none of them worked.</p>
  
  <p>Looking at the size of the JAR, the library is being included; just not recognized by Ubuntu. Perhaps I need to use some kind of command-parameter to enable the library? Here's how I run the JAR:</p>
  
  <pre><code>java -jar output.jar
  </code></pre>
  
  <p>Thanks in advance!</p>