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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? servercontroller.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? 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.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;	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕中文字幕在线一区 | 91蜜桃免费观看视频| 国产不卡免费视频| 99re热视频精品| 欧美怡红院视频| 色中色一区二区| 欧美日韩美少妇| 久久久久久久久久美女| 中文字幕中文字幕一区二区 | 极品瑜伽女神91| www.综合网.com| 欧美日韩精品欧美日韩精品一综合| 欧美美女喷水视频| 中文字幕av资源一区| 亚洲激情在线播放| 国产日韩精品一区二区浪潮av| 欧美激情一区二区三区全黄| 亚洲成年人网站在线观看| 精品一区二区免费看| 在线免费观看视频一区| 久久久综合九色合综国产精品| 亚洲自拍偷拍欧美| 国产一区二区在线看| 色综合一个色综合| 中文字幕免费不卡| 精品一区二区三区在线播放视频 | 欧美精品久久久久久久久老牛影院| 日本一区二区三级电影在线观看| 欧美一区二区播放| 欧美大肚乱孕交hd孕妇| 亚洲综合色自拍一区| 91精品在线免费| 亚洲高清免费观看高清完整版在线观看| 亚洲电影在线播放| www.色综合.com| 日韩精品专区在线| 午夜精品福利视频网站| 成人免费av网站| 欧美肥大bbwbbw高潮| 亚洲国产综合91精品麻豆| 99国产欧美另类久久久精品| 日本一区二区成人在线| 99re热视频精品| 亚洲777理论| 欧美成人aa大片| 国产a久久麻豆| 一区二区三区在线免费观看| 欧美日韩精品一区二区在线播放| 天堂久久一区二区三区| 亚洲天堂av老司机| 成人福利视频网站| 欧美日韩精品一区视频| 狠狠色丁香婷综合久久| 91精品国产综合久久福利| 中文字幕视频一区| 韩国精品主播一区二区在线观看| 一区二区三区在线观看欧美| 最好看的中文字幕久久| 国产精品看片你懂得| 欧美猛男超大videosgay| 天涯成人国产亚洲精品一区av| 日本黄色一区二区| 国产日韩精品一区二区三区| 香蕉久久一区二区不卡无毒影院 | 综合久久一区二区三区| 亚洲线精品一区二区三区| 久久丝袜美腿综合| 欧美日产在线观看| 高清国产一区二区三区| 久久久久国产成人精品亚洲午夜| 亚洲一区在线观看免费观看电影高清 | 久久―日本道色综合久久| 三级一区在线视频先锋| 在线播放中文一区| 国产精品你懂的在线欣赏| 久久精品国产亚洲高清剧情介绍| 欧美一区二区精品久久911| 国产精品系列在线观看| 蜜桃精品视频在线| 粉嫩一区二区三区在线看| aaa国产一区| 日韩一卡二卡三卡国产欧美| 成人av免费网站| 亚洲第一福利一区| 亚洲一区二区三区四区五区黄| 国产精品不卡在线观看| 中文欧美字幕免费| 美女网站在线免费欧美精品| 18欧美亚洲精品| 欧美精品1区2区3区| 丁香另类激情小说| 久久精品人人做人人综合| 亚洲欧洲日韩一区二区三区| 日韩一二三四区| 成人app在线观看| 波多野结衣中文字幕一区| 91免费看视频| 欧美丰满一区二区免费视频| 中文字幕乱码久久午夜不卡| 久久久精品影视| 亚洲欧洲综合另类在线| 日韩精品免费专区| 高清国产午夜精品久久久久久| 99精品久久久久久| 日韩一区二区免费高清| 亚洲欧洲av另类| 国内成人精品2018免费看| 96av麻豆蜜桃一区二区| 欧美成人精品二区三区99精品| 日韩久久一区二区| 国产一区激情在线| 欧美精品在线一区二区三区| 国产精品美女久久久久高潮| 日韩精品午夜视频| 欧美日韩视频专区在线播放| 精品国产精品网麻豆系列| 欧美成va人片在线观看| 精品欧美久久久| 337p日本欧洲亚洲大胆色噜噜| 欧美蜜桃一区二区三区| 日韩视频免费直播| 久久久久久久久伊人| 亚洲视频一区二区在线| 国产a精品视频| 中文字幕精品一区二区精品绿巨人 | 成人av电影在线网| 日本在线不卡一区| 欧美三级日韩在线| 亚洲一区在线观看免费| 波多野结衣在线一区| 久久精品一区二区三区不卡牛牛 | 国产久卡久卡久卡久卡视频精品| 9久草视频在线视频精品| 18欧美乱大交hd1984| av在线一区二区| 成人欧美一区二区三区小说| 夫妻av一区二区| 精品国产乱码久久久久久闺蜜| 五月婷婷综合激情| 精品美女在线播放| 国内外成人在线| 国产日韩欧美不卡在线| 97精品电影院| 五月天久久比比资源色| 欧美一区国产二区| 国产一区欧美一区| 亚洲人成网站影音先锋播放| av综合在线播放| 午夜视频在线观看一区二区三区| 日韩欧美一卡二卡| 国产麻豆视频一区二区| 国产精品电影一区二区| 在线观看一区二区视频| 日本中文字幕一区二区有限公司| 久久免费美女视频| 国产成人精品亚洲777人妖| 国产精品美女久久久久久| 欧美巨大另类极品videosbest | 国产精品色在线观看| 欧美区在线观看| 国产精品区一区二区三| 97成人超碰视| 国产伦精品一区二区三区在线观看 | 91福利在线导航| 粉嫩aⅴ一区二区三区四区| 亚洲成在线观看| 国产精品国产三级国产专播品爱网| 777色狠狠一区二区三区| 一本到不卡精品视频在线观看 | 欧美精品色一区二区三区| 国产成人av网站| 国产+成+人+亚洲欧洲自线| 看片网站欧美日韩| 免费在线看成人av| 日韩福利视频网| 久久99最新地址| 国产成人在线视频播放| 精品中文字幕一区二区小辣椒| 蜜臀久久99精品久久久久久9| 午夜私人影院久久久久| 日本不卡一区二区| 久草这里只有精品视频| 国产高清久久久久| 国产精品911| av电影天堂一区二区在线| 一本大道久久a久久综合| 欧美专区日韩专区| 精品1区2区在线观看| 国产精品每日更新| 亚洲1区2区3区4区| 国内成人精品2018免费看| 国产传媒一区在线| 在线观看免费成人| 欧美成人vr18sexvr| 国产精品超碰97尤物18| 亚洲国产精品久久不卡毛片| 久久精品国产99国产| 91日韩一区二区三区| 精品久久一区二区三区| 国产精品情趣视频|