Skip to content

Commit

Permalink
attempt to load sqlite.jar via two methods #457
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidendra committed Dec 6, 2012
1 parent fb47ca0 commit be0c68a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
<fileset dir="." includes="config/**.yml" />

<manifest>
<attribute name="Class-Path" value="LWC/lib/sqlite.jar"/>
<attribute name="Implementation-Title" value="LWC"/>
<attribute name="Implementation-Vendor" value="Hidendra"/>
<!-- <attribute name="Implementation-Version" value="git-LWC-${GIT_COMMIT}-b${BUILD_NUMBER}jnks" /> -->
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/griefcraft/sql/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import java.net.URL;
import java.net.URLClassLoader;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
Expand Down Expand Up @@ -205,7 +204,10 @@ public boolean connect() throws Exception {
}

// Load the driver class
Driver driver = (Driver) classLoader.loadClass(className).newInstance();
classLoader.loadClass(className).newInstance();
try {
Class.forName(className);
} catch (Exception e) { }

// Create the pool
LWC lwc = LWC.getInstance();
Expand Down

0 comments on commit be0c68a

Please sign in to comment.