title: Java JAR runs fine through command line, but not by double-clicking JAR
body: <p>Title is pretty self-explanatory I think. When I run the JAR, the following exceptions occurs: </p>
  
  <p><img src="https://i.stack.imgur.com/9msBc.png" alt="Error message"></p>
  
  <p>So naturally I run it through the command prompt so hopefully the exception message and stack trace shows up but when I do that, it runs perfectly fine - everything works, no messages on the prompt (except for deliberate prints of course).</p>
  
  <p>It's written in JDK 1.7.0_71 (64bit). I have JRE for that version, both 32 and 64-bit on my machine. I've force it with right-click->open with to use the javaw.exe from all three of them but each throws the same error. Putting <code>java -version</code> gets me:</p>
  
  <pre><code>java version "1.7.0_71"
  Java (TM) SE Runtime Environment (build.1.7.0_71-b14)
  Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
  </code></pre>
  
  <p>Windows 7 64-bit. NetBeans 8 (runs fine through NetBeans, no errors on output window). Program uses the GDAL, GeoTools, NetCDF, EJML, and JodaTime libraries.</p>
  
  <p>I mean I'd provide more information but I'm not even sure where to start. Even just looking for advice on where to start just to learn what the problem is.</p>
  
  <p><strong>UPDATE:</strong> After just putting a message dialog in random lines until I could narrow down the issue, looks like the error is with the GDAL/OGR libraries. (The exact line is at <code>org.gdal.ogr.RegisterAll()</code>) The strange thing is why it works fine the other ways. At this point though I figure it's a GDAL specific question now as the GDAL bindings has been very weird and troublesome before.</p>