Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java jdbc Á¬½ÓOracle9i

     ×Ô¼ºÔÚ×öÕâ¸ö³ÌÐòµÄʱºò¿´¹ýºÜ¶àµÄ×ÊÁÏ£¬ÉÏÍøÒ²²éÁ˲»ÉÙµÄ×ÊÁÏ£¬¿ÉÊǶà°ë˵µÄÊdzöÉñÈ뻯£¬ÔÆÀïÎíÀï...²»¹â¿´Á˲»Ã÷°×£¬¶øÇÒÊÇÓÐÃ÷°×Ò»µãµÄÈË£¬¿´ÁËÒ²±äµÄÓÐЩģºýÁË¡£
     ÕâÀïÎÒÑÚÊÎÒ»Ì×ÍêÕûµÄjava jdbc Á¬½ÓOracle9iµÄ·¶Àý¡£
package com.lxh.dbcon;//´ò°ü
import java.sql.*;//µ¼Èësql°ü
public class DbCon {//¶¨ÒåÁ¬½ÓÀà
 private final String DRIVER="oracle.jdbc.driver.OracleDriver";//OracleµÄÇý¶¯
 private final String URL="jdbc:oracle:thin:@localhost:1521:Oracle9i";//Oracle9iΪOracleµÄÖ÷»ú´®Ãû£¨Ò²¾ÍÊÇOracleµÄSID£©ÔÚ×°OracleµÄʱºòÌîдµÄSID
 private final String DBUSER="scott";//ÕâÀï¾ÍÒÔscott/tigerΪÓû§µÇ¼
 private final String DBPASSWORD="tiger";
 private Connection con=null;//Ô¤Ïȶ¨ÒåÒ»¸öÁ¬½Ó½Ó¿Ú
 
 public DbCon() {//ÔÚ¹¹Ôì·½·¨ÖмÓÔØÊý¾Ý¿âÇý¶¯
  try{
   Class.forName(DRIVER).newInstance();
  }catch(Exception e){
   e.printStackTrace();
  }
 }
 public Connection getConnection(){ //Á¬½ÓÊý¾Ý¿âµÄ·½·¨
  try{
   con=DriverManager.getConnection(URL,DBUSER,DBPASSWORD);
  }catch(Exception ew){
   ew.printStackTrace();
  }
  
  return con;
 }
}
ÕâÊÇÒ»¸öÍêÕûµÄÁ¬½ÓÀ࣬²âÊÔÒѾ­Í¨¹ý¡£


Ïà¹ØÎĵµ£º

Tomcat java ¶¨Ê±ÈÎÎñ

Á½¸ötomcat Java¶¨Ê±ÈÎÎñµÄÀý×Ó
ÀýÒ»£º
±¾ÀýÒÀ¾ÝJava×ÔÉíÌṩµÄ½Ó¿ÚʵÏÖ£¬Í¨¹ý¼àÌýÆ÷£¨Listener£©ºÍ¶¨Ê±Æ÷£¨Timer£©¶¨Ê±Ö´ÐÐij¸öÈÎÎñ£¨Task£©¡£
רҵµÄ¿ªÔ´¹¤¾ß¿É²Î¿¼Quartz£ºhttp://www.opensymphony.com/quartz/
MyListener£º
import
 java.util.Timer;
import
 javax.servlet.ServletContextEvent;
i ......

java»ñÈ¡µ±Ç°Ê±¼ä£¨×ªÔØ£©


ÓÐÁ½ÖÖ·½·¨£º
·½·¨Ò»£ºÓÃjava.util.DateÀàÀ´ÊµÏÖ£¬²¢½áºÏjava.text.DateFormatÀàÀ´ÊµÏÖʱ¼äµÄ¸ñʽ»¯£¬¿´ÏÂÃæ´úÂ룺
import java.util.*;
import java.text.*;
//ÒÔÏÂĬÈÏʱ¼äÈÕÆÚÏÔʾ·½Ê½¶¼ÊǺºÓïÓïÑÔ·½Ê½
//Ò»°ãÓïÑÔ¾ÍĬÈϺºÓï¾Í¿ÉÒÔÁË£¬Ê±¼äÈÕÆڵĸñʽĬÈÏΪMEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53
//ÒÔÏÂÏÔʾµÄÈ ......

javaÖкº×ÖתƴÒô

´úÂëÈçÏ£º
¡¡¡¡ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
¡¡¡¡package com.example.pinyin.demo2;
¡¡¡¡import net.sourceforge.pinyin4j.PinyinHelper;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
¡¡¡¡import net.sourceforge.pinyin4j.form ......

java¶Áдɾ.text,.xmlÎļþÄÚÈÝ

package fileIo;  
 
import  java.io.BufferedReader;  
import  java.io.BufferedWriter;  
import  java.io.File;  
import  java.io.FileReader;  
import  java.io.FileWriter;  
 
 public&nb ......

ÎÒºÍJavaµÄһЩÍùÊÂ

     ´ó¼ÒÖªµÀ£¬ÔÚ1991Ä꣬¼¸ºõÓëLinuxͬʱ£¬SUN·¢²¼ÁËJava±à³ÌÓïÑÔ¡£²»¾Ã£¬ÎҵĴóѧͬѧ£¨±ÈÎÒµÍÁ½Ä꣩Íõ¿Ëºê½ÌÊÚ£¨Ç廪²©Ê¿µ¼Ê¦£©ÓëSUNºÏ×÷³ÉÁ¢ÁËÖйú×îÔçµÄ“JavaÑо¿ÖÐÐÄ”£¬²¢ÇÒµ£ÈθÃÖÐÐÄÖ÷ÈΡ£´Ó´Ë£¬ÎÒ¿ªÊ¼×¢ÒâJava¼¼ÊõµÄ·¢Õ¹¶¯Ì¬¡£ÎÒ¼ÒÖеĴæÊ飬ÒÔJavaÊé¼®×î¶à£¨µ±È»£¬³ýÁËÊýѧÊé¼® ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ