Skip to content
Browse files

Added database properties file, and fleshed out the Response server b…

…asics
  • Loading branch information...
1 parent f60ba50 commit fba35def2379332ac5b43d5c8310a4258b291ca7 @predominant committed Jun 2, 2012
View
1 RouteMeServer/.gitignore
@@ -26,3 +26,4 @@ local.properties
.buildpath
twitter4j.properties
+database.properties
View
0 RouteMeServer/database.properties.default
No changes.
View
26 RouteMeServer/src/routeme/server/response/ResponseServer.java
@@ -1,13 +1,37 @@
package routeme.server.response;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
public class ResponseServer {
+ public ResponseServer(Properties prop) {
+ try {
+ Class.forName("com.mysql.jdbc.Driver");
+ } catch (ClassNotFoundException e) {
+ System.out.println("Unable to load MySQL Driver");
+ System.exit(1);
+ }
+ }
+ protected void getConnection() {
+
+ }
/**
* @param args
*/
public static void main(String[] args) {
- ResponseServer server = new ResponseServer();
+ Properties prop = new Properties();
+
+ try {
+ prop.load(new FileInputStream("database.properties"));
+ ResponseServer server = new ResponseServer(prop);
+ } catch (IOException e) {
+ System.out.println("Failed to load database.properties file");
+ System.exit(2);
+ }
+
}
}

0 comments on commit fba35de

Please sign in to comment.
Something went wrong with that request. Please try again.