How can I start apache derby programmatically jar file?

后端 未结 3 719
抹茶落季
抹茶落季 2020-12-07 03:28

I have a Java application, which uses Apache Derby. Using Eclipse Export option, I exported it as JAR file. When I am running Eclipse, and the server is connected to port 15

相关标签:
3条回答
  • 2020-12-07 04:04

    Simplest is to use embedded Derby

            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
            conn = DriverManager.getConnection("jdbc:derby:" + DATA_STORE + ";create=true");
    
    0 讨论(0)
  • 2020-12-07 04:23

    You can start the NetworkServer programmatically:

    NetworkServerControl serverControl = new NetworkServerControl(InetAddress.getByName("myhost"),1621)
    
    serverControl.shutdown();
    
    0 讨论(0)
  • 2020-12-07 04:28

    You need to start the server programmatically.

    How this is done is documented in the manual:

    http://db.apache.org/derby/docs/10.8/adminguide/tadminconfig814963.html

    0 讨论(0)
提交回复
热议问题