亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? servercontroller.java

?? mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序
?? JAVA
字號:
/* Copyright (C) 2002-2004 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package com.mysql.jdbc.util;import java.io.File;import java.io.IOException;import java.util.Iterator;import java.util.Locale;import java.util.Properties;import com.mysql.jdbc.StringUtils;/** * Controls a MySQL server using Java RunTime methods *  * @version $Id: ServerController.java,v 1.1.2.1 2005/05/13 18:58:39 mmatthews *          Exp $ * @author Mark Matthews */public class ServerController {	/**	 * Where is the server installed?	 */	public static final String BASEDIR_KEY = "basedir";	/**	 * Where are the databases installed?	 */	public static final String DATADIR_KEY = "datadir";	/**	 * Where is the config file located?	 */	public static final String DEFAULTS_FILE_KEY = "defaults-file";	/**	 * What is the name of the executable to run?	 */	public static final String EXECUTABLE_NAME_KEY = "executable";	/**	 * What is the path to the mysql server executable (if not standard?)	 */	public static final String EXECUTABLE_PATH_KEY = "executablePath";	/**	 * The default executable to run	 */	/**	 * The process representing the MySQL server	 */	private Process serverProcess = null;	/**	 * The list of properties for this server	 */	private Properties serverProps = null;	/**	 * The system properties	 */	private Properties systemProps = null;	/**	 * Creates a ServerController with the directory for the MySQL server.	 * 	 * The 'datadir' is set to the same directory.	 * 	 * @param baseDir	 *            the base directory for the MySQL server.	 */	public ServerController(String baseDir) {		setBaseDir(baseDir);	}	/**	 * Creates a server controller for the MySQL server with the given basedir	 * and datadir.	 * 	 * @param basedir	 *            the basedir to use when starting MySQL.	 * @param datadir	 *            the datadir to use when starting MySQL.	 */	public ServerController(String basedir, String datadir) {	}	/**	 * Sets the basedir to use when starting MySQL.	 * 	 * @param baseDir	 *            the basedir to use when starting MySQL.	 */	public void setBaseDir(String baseDir) {		getServerProps().setProperty(BASEDIR_KEY, baseDir);	}	/**	 * Sets the data to use when starting MySQL.	 * 	 * @param dataDir	 *            the basedir to use when starting MySQL.	 */	public void setDataDir(String dataDir) {		getServerProps().setProperty(DATADIR_KEY, dataDir);	}	/**	 * Starts the server, returning a java.lang.Process instance that represents	 * the mysql server.	 * 	 * @return Process a java.lang.Process instance representing the mysql	 *         server process.	 * @throws IOException	 *             if an error occurs while starting the mysql server.	 */	public Process start() throws IOException {		if (this.serverProcess != null) {			throw new IllegalArgumentException("Server already started");		} else {			this.serverProcess = Runtime.getRuntime().exec(getCommandLine());			return this.serverProcess;		}	}	/**	 * Stops the server (if started)	 * 	 * @param forceIfNecessary	 *            use forceStop if mysqladmin doesn't shut the server down	 * 	 * @throws IOException	 *             if an error occurs while stopping the server	 */	public void stop(boolean forceIfNecessary) throws IOException {		if (this.serverProcess != null) {			String basedir = getServerProps().getProperty(BASEDIR_KEY);			StringBuffer pathBuf = new StringBuffer(basedir);			if (!basedir.endsWith(File.separator)) {				pathBuf.append(File.separator);			}			String defaultsFilePath = getServerProps().getProperty(					DEFAULTS_FILE_KEY);			pathBuf.append("bin");			pathBuf.append(File.separator);			pathBuf.append("mysqladmin shutdown");			System.out.println(pathBuf.toString());			Process mysqladmin = Runtime.getRuntime().exec(pathBuf.toString());			int exitStatus = -1;			try {				exitStatus = mysqladmin.waitFor();			} catch (InterruptedException ie) {				; // ignore			}			//			// Terminate the process if mysqladmin couldn't			// do it, and the user requested a force stop.			//			if (exitStatus != 0 && forceIfNecessary) {				forceStop();			}		}	}	/**	 * Forcefully terminates the server process (if started).	 */	public void forceStop() {		if (this.serverProcess != null) {			this.serverProcess.destroy();			this.serverProcess = null;		}	}	/**	 * Returns the list of properties that will be used to start/control the	 * server.	 * 	 * @return Properties the list of properties.	 */	public synchronized Properties getServerProps() {		if (this.serverProps == null) {			this.serverProps = new Properties();		}		return this.serverProps;	}	/**	 * Returns the full commandline used to start the mysql server, including	 * and arguments to be passed to the server process.	 * 	 * @return String the commandline used to start the mysql server.	 */	private String getCommandLine() {		StringBuffer commandLine = new StringBuffer(getFullExecutablePath());		commandLine.append(buildOptionalCommandLine());		return commandLine.toString();	}	/**	 * Returns the fully-qualifed path to the 'mysqld' executable	 * 	 * @return String the path to the server executable.	 */	private String getFullExecutablePath() {		StringBuffer pathBuf = new StringBuffer();		String optionalExecutablePath = getServerProps().getProperty(				EXECUTABLE_PATH_KEY);		if (optionalExecutablePath == null) {			// build the path using the defaults			String basedir = getServerProps().getProperty(BASEDIR_KEY);			pathBuf.append(basedir);			if (!basedir.endsWith(File.separator)) {				pathBuf.append(File.separatorChar);			}			if (runningOnWindows()) {				pathBuf.append("bin");			} else {				pathBuf.append("libexec");			}			pathBuf.append(File.separatorChar);		} else {			pathBuf.append(optionalExecutablePath);			if (!optionalExecutablePath.endsWith(File.separator)) {				pathBuf.append(File.separatorChar);			}		}		String executableName = getServerProps().getProperty(				EXECUTABLE_NAME_KEY, "mysqld");		pathBuf.append(executableName);		return pathBuf.toString();	}	/**	 * Builds the list of command-line arguments that will be passed to the	 * mysql server to be started.	 * 	 * @return String the list of command-line arguments.	 */	private String buildOptionalCommandLine() {		StringBuffer commandLineBuf = new StringBuffer();		if (this.serverProps != null) {			for (Iterator iter = this.serverProps.keySet().iterator(); iter					.hasNext();) {				String key = (String) iter.next();				String value = this.serverProps.getProperty(key);				if (!isNonCommandLineArgument(key)) {					if (value != null && value.length() > 0) {						commandLineBuf.append(" \"");						commandLineBuf.append("--");						commandLineBuf.append(key);						commandLineBuf.append("=");						commandLineBuf.append(value);						commandLineBuf.append("\"");					} else {						commandLineBuf.append(" --");						commandLineBuf.append(key);					}				}			}		}		return commandLineBuf.toString();	}	/**	 * Returns true if the property does not belong as a command-line argument	 * 	 * @return boolean if the property should not be a command-line argument.	 */	private boolean isNonCommandLineArgument(String propName) {		return propName.equals(EXECUTABLE_NAME_KEY)				|| propName.equals(EXECUTABLE_PATH_KEY);	}	/**	 * Lazily creates a list of system properties.	 * 	 * @return Properties the properties from System.getProperties()	 */	private synchronized Properties getSystemProperties() {		if (this.systemProps == null) {			this.systemProps = System.getProperties();		}		return this.systemProps;	}	/**	 * Is this ServerController running on a Windows operating system?	 * 	 * @return boolean if this ServerController is running on Windows	 */	private boolean runningOnWindows() {		return StringUtils.indexOfIgnoreCase(getSystemProperties().getProperty(				"os.name"), "WINDOWS") != -1;	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久综合狠狠综合久久| 99视频超级精品| 国产成人免费视频一区| 日本久久电影网| 欧美精品一区二| 亚洲福利视频三区| 97精品久久久午夜一区二区三区| 91精品国产综合久久小美女| 中文字幕在线观看不卡视频| 青青草伊人久久| 色中色一区二区| 久久网站最新地址| 麻豆一区二区三| 91国模大尺度私拍在线视频| 国产欧美一区二区精品婷婷| 日韩成人av影视| 欧美性受xxxx黑人xyx| 中文字幕va一区二区三区| 麻豆一区二区在线| 91麻豆精品国产91久久久资源速度| 日韩伦理电影网| 99久久精品国产一区| 日本一区二区动态图| 极品少妇xxxx偷拍精品少妇| 欧美一区二区三区在线电影| 亚洲国产欧美一区二区三区丁香婷| 成人av网在线| 欧美激情自拍偷拍| 国产成人在线观看| 久久丝袜美腿综合| 国产精品一二一区| 国产丝袜美腿一区二区三区| 国产精品一二三在| 国产偷国产偷精品高清尤物 | 精品亚洲成a人| 69堂成人精品免费视频| 亚州成人在线电影| 欧美年轻男男videosbes| 亚洲国产精品一区二区久久| 在线免费精品视频| 亚洲成人你懂的| 7777女厕盗摄久久久| 日韩有码一区二区三区| 91精品麻豆日日躁夜夜躁| 日本午夜一本久久久综合| 欧美一级一区二区| 国产麻豆精品久久一二三| 国产亚洲一区字幕| 不卡的看片网站| 亚洲五月六月丁香激情| 欧美精选一区二区| 国产一区二区视频在线| 国产精品久久午夜夜伦鲁鲁| 99九九99九九九视频精品| 亚洲精品成人悠悠色影视| 欧美性色黄大片手机版| 蜜桃av一区二区在线观看| 国产欧美一区二区精品性| 91啪九色porn原创视频在线观看| 亚洲影视在线观看| 精品国免费一区二区三区| av男人天堂一区| 亚洲电影欧美电影有声小说| 精品国产一区二区三区忘忧草| 国产精品羞羞答答xxdd| 亚洲综合久久久久| 欧美精品一区二区三区很污很色的 | 亚洲卡通欧美制服中文| 欧美日韩国产中文| 国产精品一线二线三线| 亚洲美女屁股眼交3| 欧美一级黄色录像| 99精品国产一区二区三区不卡| 亚洲午夜精品17c| 久久精品视频免费观看| 在线免费不卡视频| 国产剧情在线观看一区二区| 亚洲精品成人在线| 国产喂奶挤奶一区二区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 麻豆精品视频在线观看视频| 亚洲欧美在线高清| 欧美一级片免费看| 欧美亚洲国产怡红院影院| 国产老妇另类xxxxx| 日韩av二区在线播放| 中文字幕一区二区三区在线观看 | 亚洲一区免费观看| 欧美国产成人精品| 日韩欧美在线一区二区三区| 日本高清不卡aⅴ免费网站| 精品一区二区三区欧美| 亚洲一区二区三区四区的| 中文字幕不卡在线| 亚洲精品在线免费观看视频| 欧美性xxxxxxxx| 91丝袜美腿高跟国产极品老师| 寂寞少妇一区二区三区| 青娱乐精品视频在线| 亚洲午夜国产一区99re久久| 中文字幕亚洲一区二区va在线| 精品免费国产二区三区| 欧美男人的天堂一二区| 在线精品视频一区二区三四| 高清久久久久久| 国产成人三级在线观看| 麻豆精品一区二区av白丝在线| 午夜视频在线观看一区| 亚洲国产日韩一区二区| 亚洲女女做受ⅹxx高潮| 亚洲视频电影在线| 日韩码欧中文字| 亚洲人成小说网站色在线| 中文成人av在线| 中文av一区二区| 国产精品嫩草久久久久| 国产欧美一区二区精品性| 欧美国产一区二区| 精品国产精品网麻豆系列| 精品国产乱码91久久久久久网站| 精品少妇一区二区三区在线播放 | 亚洲综合免费观看高清完整版| 亚洲天堂免费在线观看视频| 日韩理论在线观看| 一区二区三区视频在线观看| 亚洲最新在线观看| 亚洲夂夂婷婷色拍ww47| 天天免费综合色| 三级久久三级久久| 精品一二三四在线| 国产1区2区3区精品美女| 北岛玲一区二区三区四区| 不卡高清视频专区| 欧美中文一区二区三区| 欧美理论片在线| 欧美va在线播放| 国产精品久久久久久久第一福利 | 91精品国产高清一区二区三区蜜臀| 欧美三电影在线| 91精品国产综合久久久久久久久久| 91精品国产入口在线| 国产亚洲一区二区三区在线观看| 国产精品久久久久久久久久久免费看| 亚洲精品国产无天堂网2021| 五月婷婷欧美视频| 国产自产2019最新不卡| 99久久精品久久久久久清纯| 精品视频一区二区三区免费| 日韩欧美国产高清| 国产精品福利电影一区二区三区四区| 亚洲人成在线播放网站岛国| 日韩高清在线电影| yourporn久久国产精品| 7777精品伊人久久久大香线蕉最新版| 久久久一区二区三区捆绑**| 亚洲男女一区二区三区| 伦理电影国产精品| 99re热这里只有精品免费视频| 777久久久精品| 国产精品国产三级国产普通话三级| 一区二区三区四区高清精品免费观看| 免费看欧美女人艹b| 99精品桃花视频在线观看| 日韩一区二区三区四区五区六区| 国产精品久久久久久户外露出 | 91色综合久久久久婷婷| 日韩一区二区三区在线视频| 亚洲少妇30p| 国产尤物一区二区| 91精品国产免费久久综合| 亚洲色图欧美偷拍| 狠狠色丁香婷综合久久| 欧美日韩综合在线| 国产精品国产自产拍高清av| 欧美aⅴ一区二区三区视频| 91国产福利在线| 国产精品久久久久aaaa樱花| 激情五月播播久久久精品| 欧美三级视频在线观看| 亚洲欧美激情在线| 国产不卡视频在线观看| 精品久久久久99| 日韩不卡一二三区| 欧美熟乱第一页| 一区二区三区在线看| 高清国产一区二区三区| 久久久三级国产网站| 美女www一区二区| 777亚洲妇女| 亚洲国产综合在线| 色诱视频网站一区| 亚洲欧美自拍偷拍色图| 国产成人一区在线| 国产日韩亚洲欧美综合| 8v天堂国产在线一区二区| 国产丝袜美腿一区二区三区| 蜜臀av亚洲一区中文字幕| 欧美精品久久天天躁| 亚洲午夜久久久久久久久久久 | 国产一区二区三区精品视频|