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

±£´æjava¶ÔÏóµ½Êý¾Ý¿â£¬²¢´ÓÊý¾Ý¿â¶Á³öÉú³ÉÓû§½çÃæ



ÏòÊý¾Ý¿â±£´æ¶ÔÏ󣬲ÉÓÃObjectOutputStreamÏòÊý¾Ý¿âÖ±½ÓдÈë
/**
 * Title: AF
 * Description: ÏòÊý¾Ý¿âÖÐдÈë¶ÔÏó²âÊÔ³ÌÐò
 * Copyright: Copyright 2009 ufgov, Inc.
 * Company: ufgov
 * ´´½¨Ê±¼ä: 2009-10-29
 * @author ÁõÓÀΰ(manlge)
 * @version 1.0
 */
public class WriteObjectToBlob {

  /*
   * ½¨±ísql
   * CREATE TABLE "AF"."TABLE2" ("NAME" VARCHAR2(36) NOT NULL, "DATA"  BLOB NOT NULL) TABLESPACE "AF"
   */

  public static Connection getConnection(String host, int port, String dataBaseName,
    String userName, String password) throws Exception {
    String url = String.format("jdbc:oracle:thin:@%s:%s:%s", host, port,
      dataBaseName);
    String driver = "oracle.jdbc.driver.OracleDriver";
    Class.forName(driver);
    Connection con = DriverManager.getConnection(url, userName, password);
    return con;
  }

  /**
   * @param args
   * @throws SQLException
   * @throws ClassNotFoundException
   */
  public static void main(String[] args) throws Exception {
    Connection connection = getConnection("localhost", 1521, "ORCL", "AF", "1");
    System.out.println(connection);
    connection.setAut


Ïà¹ØÎĵµ£º

javaÐéÄâ»úʹÓÃÄÚ´æµÄ˼¿¼

¹ØÓÚjavaÐéÄâ»úʹÓÃÄÚ´æµÄ˼¿¼
 JVM(javaÐéÄâ»ú)Æäʵ¾ÍÊDzÙ×÷ϵͳ(Èçwindows)ÉϵÄÒ»¸öÆÕͨ³ÌÐò(½ø³ÌÃû½Ðjava,Õâ¸ö³ÌÐò¿ÉÒÔ½âÊÍÖ´ÐÐclassÎļþ)¡£
 µ±java½ø³ÌÆô¶¯Ê±»áÊ×ÏÈ·ÖÅäÒ»¿é¶ÑÄڴ棨×îСÄڴ棩£¬ÒÔºóÿµ±class×Ö½ÚÂë³ÌÐòÒªÇóJVM(java½ø³Ì)·ÖÅäÄÚ´æʱ£¬JVM
 ¾Í»áÔÚÔ¤ÏÈ·ÖÅäµÄÄÇ¿éÄÚ´æÉÏÃæΪclass×Ö½Ú ......

java»ñÈ¡µ±Ç°Â·¾¶

java»ñÈ¡µ±Ç°Â·¾¶
 
1¡¢ÀûÓÃSystem.getProperty()º¯Êý»ñÈ¡µ±Ç°Â·¾¶£º
System.out.println(System.getProperty("user.dir"));//user.dirÖ¸¶¨Á˵±Ç°µÄ·¾¶
2¡¢Ê¹ÓÃFileÌṩµÄº¯Êý»ñÈ¡µ±Ç°Â·¾¶£º
File directory = new File("");//É趨Ϊµ±Ç°Îļþ¼Ð
try{
    System.out.println(directory.getCano ......

Java¹Ø¼ü×Öfinal¡¢staticʹÓÃ×ܽá

 
Ò»¡¢final

¡¡¸ù¾Ý³ÌÐòÉÏÏÂÎÄ»·¾³£¬Java
¹Ø¼ü×ÖfinalÓГÕâÊÇÎÞ·¨¸Ä±äµÄ”»òÕß“ÖÕ̬µÄ”º¬Ò壬Ëü¿ÉÒÔÐÞÊηdzéÏóÀà¡¢·Ç³éÏóÀà³ÉÔ±·½·¨ºÍ±äÁ¿¡£Äã¿ÉÄܳöÓÚÁ½ÖÖÀí½â¶øÐèÒª×èÖ¹¸Ä±ä£ºÉè¼Æ»òЧÂÊ¡£
finalÀ಻Äܱ»¼Ì³Ð£¬Ã»ÓÐ×ÓÀ࣬finalÀàÖеķ½·¨Ä¬ÈÏÊÇfinalµÄ¡£
final·½·¨²»Äܱ»×ÓÀàµÄ·½· ......

Javaѧϰ´ÓÈëÃŵ½¾«Í¨

Javaѧϰ´ÓÈëÃŵ½¾«Í¨
ѧϰǰÁ˽â
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣠......

JavaÖзÓÉÆ÷ģʽ

 import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.io.Serializable;
import java.rmi.Na ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ