本文整理汇总了Java中com.mysql.jdbc.util.ServerController类的典型用法代码示例。如果您正苦于以下问题:Java ServerController类的具体用法?Java ServerController怎么用?Java ServerController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServerController类属于com.mysql.jdbc.util包,在下文中一共展示了ServerController类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testServerController
import com.mysql.jdbc.util.ServerController; //导入依赖的package包/类
/**
* Demonstrates usage of the ServerController class.
*
* This test is only run if the property
* 'com.mysql.jdbc.test.ServerController.basedir' is set.
*
* @throws Exception
* if an error occurs.
*/
public void testServerController() throws Exception {
if (this.baseDir != null) {
System.out.println("Starting server @ " + this.baseDir);
ServerController controller = new ServerController(this.baseDir);
System.out.println(controller.start());
System.out.println("Hit enter to stop server....");
System.in.read();
controller.stop(true);
}
}
示例2: testServerController
import com.mysql.jdbc.util.ServerController; //导入依赖的package包/类
/**
* Demonstrates usage of the ServerController class.
*
* This test is only run if the property
* 'com.mysql.jdbc.test.ServerController.basedir' is set.
*
* @throws Exception
* if an error occurs.
*/
public void testServerController() throws Exception {
if (this.baseDir != null) {
System.out.println("Starting server @ " + this.baseDir);
ServerController controller = new ServerController(this.baseDir);
System.out.println(controller.start());
System.out.println("Hit enter to stop server....");
System.in.read();
controller.stop(true);
}
}