ʹÓÃJavaʵÏÖ¶ÔMySqlÊý¾Ý¿âµÄµ¼ÈëÓëµ¼³ö
package com.project.ajaxs;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.util.Date;
public class BakMysql {
//mainµÄ·½·¨£¬Ö÷ÒªÊÇÎÒÓÃÓÚ²âÊԵģ¬ÊÇÏë×ÅÈ¡µÃCLASSµÄ·¾¶£¬È»ºó±¸·ÝµÄÎļþдÔÚ·þÎñÆ÷µÄÀà·¾¶ÏÂ
public static void main(String[] args) {
BakMysql bk = new BakMysql();
bk.backup();
// bk.load();
}
//backup·½·¨ÊDZ¸·ÝÊý¾Ý¿âµ½·þÎñÆ÷µØÖ·
public void backup() {
Calendar now = Calendar.getInstance();
String name = now.getTime()+""+(now.getTime().getMonth()+1)+""+now.getTime().getDate();
String filename = name.substring(24)+" "+name.substring(11,13)+""+name.substring(14,16)+""+name.substring(17,19);
try {
String filePath ="e:/project"+filename+".sql";
Runtime rt = Runtime.getRuntime();
// µ÷Óà mysql µÄ cmd:
Process child = rt.exec("C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump.exe -uroot -p8095longchun project");// ÉèÖõ¼³ö±àÂëΪutf8¡£ÕâÀï±ØÐëÊÇutf8
//×¢ÒâÕâÒ»¾ä£¬ÊÇÖ¸ÔËÐÐmysqldumpÃüÁºóÃæ¸úµÄÊǵǼÃûºÍµÇ¼µÄÃÜÂ룬½ÓןóÃæµÄÊÇÖ¸±¸·ÝµÄÊý¾Ý¿âµÄÃû×Ö£¬µ½´Ë½áÊø£¬ÒÔ´ËÉú³ÉÒ»¸öÖ´ÐеĽø³Ì£¬È¡µÃ´Ë½ø³ÌµÄÊä³öÁ÷µ½ÎÒÃÇÒª±¸·ÝµÄÎļþ
// °Ñ½ø³ÌÖ´ÐÐÖеĿØÖÆ̨Êä³öÐÅϢдÈë.sq
Ïà¹ØÎĵµ£º
ËùÐèÈí¼þ£¨×¢Òâ°æ±¾£¡£©£º
Apache2.2.3
PHP5.1.5
MySQL5.0.24
ÕâÈý¸öÈí¼þ¶¼ÊÇÃâ·ÑµÄ£¬¿É´Ó¹ÙÍøÉÏÏÂÔØ£¬Ä¿Ç°ÎÒËùÓеÄÈí¼þÃûΪ£º
apache_2.2.3-win32-x86-no_ssl.msi
mysql-5.0.24-win32.zip
php-5.1.5-Win32.zip
»ùÓÚwindows²Ù×÷ϵͳ£¬ÔÚWindows XPÏ°²×°Ê¹Óãº
1¡¢°²×°¹ý³Ì£º  ......
1.¸ÅÊö
JSPÊÇÒ»ÖÖʵÏÖÆÕͨ¾²Ì¬HTMLºÍ¶¯Ì¬HTML»ìºÏ±àÂëµÄ¼¼Êõ¡£
JSP×îÖջᱻת»»³É±ê×¼µÄServlet£¡£¡£¡
JSPÉè¼ÆµÄÄ¿µÄÔÚÓÚ¼ò»¯±íʾ²ãµÄ±íʾ¡£
JSPÒ³ÃæµÄÆäËû³É·ÖÖ÷ÒªÓÐÈçÏÂÈýÖÖ£º
½Å±¾ÔªËØ
Ö¸Áî
¶¯×÷
ÀýÈ磺
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*& ......
ת×Ô
http://blog.pfan.cn/sword2008/13772.html
Ò»¡¢static
¡¡¡¡ÇëÏÈ¿´ÏÂÃæÕâ¶Î³ÌÐò£º
public class Hello{
public static void main(String[] args){
//(1)
System.out.println("Hello,world!"); //(2)
......
JAVA×¢ÊÍ·½·¨¼°¸ñʽ
1¡¢µ¥ÐÐ(single-line)--¶Ì×¢ÊÍ£º//……
µ¥¶ÀÐÐ×¢ÊÍ£ºÔÚ´úÂëÖе¥ÆðÒ»ÐÐ×¢ÊÍ£¬ ×¢ÊÍÇ°×îºÃÓÐÒ»ÐпÕÐУ¬²¢ÓëÆäºóµÄ´úÂë¾ßÓÐÒ»ÑùµÄËõ½ø²ã¼¶¡£Èç¹ûµ¥ÐÐÎÞ·¨Íê³É£¬ÔòÓ¦²ÉÓÿé×¢ÊÍ¡£
×¢Ê͸ñʽ£º/* ×¢ÊÍÄÚÈÝ */
ÐÐÍ·×¢ÊÍ£ºÔÚ´úÂëÐеĿªÍ·½øÐÐ×¢ÊÍ¡£Ö÷ҪΪÁËʹ¸ÃÐд ......
¡¡1¡¢Ê¹ÓÃjava.util.ResourceBundleÀàµÄgetBundle()·½·¨
ʾÀý£º
String name = "logging"; // the logging.properties file in src root folder
ResourceBundle rb = ResourceBundle.getBundle(name,Locale.getDefault());
// test the rb
String propertyKey = "xxx";
System.out.println(rb.getString(propert ......