Newer
Older
osmCoverage / src / Demo.java
@yuuhayashi yuuhayashi on 29 Jan 2017 906 bytes first
  1. import java.io.*;
  2. import java.sql.Connection;
  3. import java.sql.SQLException;
  4. import jp.co.areaweb.tools.database.*;
  5.  
  6. public class Demo {
  7. /**
  8. * メイン
  9. *
  10. * java -cp .:SelectBusstop.jar:hayashi_0225.jar:postgresql-9.4.1212.jar osm.jp.SelectBusstop
  11. *
  12. * @throws IOException
  13. * @throws SQLException
  14. * @throws ClassNotFoundException
  15. * @throws FileNotFoundException
  16. * @throws TransformerException
  17. * @throws SAXException
  18. * @throws ParserConfigurationException */
  19. public static void main(String[] args) throws FileNotFoundException, ClassNotFoundException, SQLException, IOException
  20. {
  21. File dbdir = new File("database");
  22. if (!dbdir.isDirectory()) {
  23. dbdir.mkdir();
  24. }
  25.  
  26. Connection con = DatabaseTool.openDb("database");
  27. //Demo.initDb(con);
  28.  
  29. try {
  30. System.out.println("Connection OK!");
  31. }
  32. finally {
  33. DatabaseTool.closeDb(con);
  34. }
  35. }
  36.  
  37. }