title: Runnable JAR not working with referenced libraries
body: <p>I want to create a runnable JAR that include referenced libraries, namely <a href="http://jackson.codehaus.org/" rel="nofollow noreferrer">jackson</a>,  in eclipse via the export. There used to be <em>fat jar</em> that seemed to be the goto solution before Eclipse offered to export to runnable JAR. </p>
  
  <p>From this <a href="https://stackoverflow.com/questions/8302894/what-is-the-difference-between-runnable-jar-library-handling-options">question</a>, the first option would be what I'm looking for. Since it is for the moment a small project, it wouldn't be a problem to always have everything together (plus it's easier for me since I'm just starting with JARs, runnables and jnlp)</p>
  
  <p>When I try to launch it, there's an alert window saying there was a problem and to try to find it in the console (which I can't get to open).</p>
  
  <p>If I remove any use of this referenced library everything runs perfectly (except the part that it's not doing what I want at all). The window looks the way I designed it, but no functionality without the library.</p>
  
  <p>I don't even have a stack trace to help with the problem. I've created other projects without any referenced libraries and everything is fine. So I've pretty much narrowed it down.</p>
  
  <p>Since I let Eclipse handle the exporting and everything, I don't suppose you need the manifest to see if it is alright. Any questions you might have, I'll provide the informations you need. It goes without saying that the project runs directly from Eclipse.</p>
  
  <p>Eclipse
  Version: Indigo Service Release 2
  Build id: 20120216-1857</p>
  
  <hr>
  
  <p><strong>Edit following <a href="https://stackoverflow.com/users/213727/baqueta">Baqueta</a>'s answer</strong></p>
  
  <p>What happens when I do that is that I get a custom RuntimeException. I'm a bit baffled here. Here's a simple explanation of my code. 
  I have a utility class (UtilityJSON) that uses the referenced library (jackson). The constructor of that utility class instantiate an object defined in the referenced library, let's call it mapper. 
  A method of UtilityJSON uses a method of 'mapper'. At this point the exception is raised. Why I'm baffled is that 'mapper' is succesfully instantiated but using its method raises an exception. If the jar couldn't find the referenced library, it probably couldn't create the object 'mapper'. But running the project from Eclipse is all fine. 
  Is there any way to debug when running an executable jar? Maybe echo something in the console.</p>
  
  <hr>
  
  <p><strong>Edit 2</strong></p>
  
  <p>I may have found the error. My program reads a *.txt file in a folder inside the project. When exploring the content of the jar I see that this folder was not included, thus the exception. So the question now becomes: how do I include this folder? It's in the root folder of the project.</p>