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

JavaÖеÄ×Ö·û¼¯±àÂëÈëÃÅ 2

 
¡¡¡¡Ëµµ½GB2312ºÍGBK¾Í²»µÃ²»ÌáÖÐÎÄÍøÒ³µÄ±àÂë¡£¾¡¹ÜºÜ¶àпª·¢µÄWebϵͳºÍÐÂÉÏÏßµÄ×¢Öعú¼Ê»¯µÄÍøÕ¾¶¼¿ªÊ¼Ê¹ÓÃUTF-8£¬ÈÔÓÐÏ൱һ²¿·ÖµÄÖÐÎÄýÌå¼á³ÖʹÓÃGB2312ºÍGBK£¬ÀýÈçÐÂÀ˵ÄÒ³Ãæ¡£ÆäÖÐÓÐÁ½µãºÜÖµµÃ×¢Òâ¡£
¡¡¡¡µÚÒ»£¬Ò³ÃæÖÐmeta±êÇ©µÄ²¿·Ö£¬³£³£¿ÉÒÔ¼ûµ½charset=GB2312ÕâÑùµÄд·¨£¬ºÜ²»ÐÒµÄÊÇ£¬Õâ¸ö“charset”ÆäʵÊÇÓÃÀ´Ö¸¶¨Ò³ ÃæʹÓõÄÊÇʲô×Ö·û¼¯±àÂ룬¶ø²»ÊÇʹÓÃʲô×Ö·û¼¯¡£ÀýÈçÄã¼ûµ½¹ýÓÐÈËд“charset=UTF-8”£¬¼ûµ½¹ýÓÐÈËд“charset=ISO- 8859-1”£¬µ«Äã¼û¹ýÓÐÈËд“charset=Unicode”ô?µ±È»Ã»ÓУ¬ÒòΪUnicodeÊÇÒ»¸ö×Ö·û¼¯£¬¶ø²»ÊDZàÂë¡£
¡¡¡¡È»¶øÕýÊÇcharsetÕâ¸öÃû³ÆÎóµ¼Á˺ܶà³ÌÐòÔ±£¬ÕæµÄÒÔΪÕâÀïÒªÖ¸¶¨µÄÊÇ×Ö·û¼¯£¬Ò²Òò¶øʹËûÃǽøÒ»²½µÄÎóÒÔΪUTF-8ºÍUTF-16ÊÇÒ»ÖÖ ×Ö·û¼¯!(Íò¶ñ°¡)ºÃÔÚXMLÖÐÒѾ­×ö³öÁËÐ޸ģ¬Õâ¸öλÖøijÉÁËÕýÈ·µÄÃû³Æ£ºencoding.µÚ¶þ£¬Ò³ÃæÖÐ˵µÄGB2312£¬Êµ¼ÊÉϲ¢²»ÕæµÄÊÇ GB2312(¾ªÑÈô?)¡£ÎÒÃÇÀ´×ö¸öʵÑ飬ÀýÈçÕÒÒ»¸öGB2312Öв»´æÔڵĺº×Ö“亸”(Õâ¸ö×Öȷʵ²»ÔÚGB2312ÖУ¬Äã¿ÉÒÔµ½GB2312µÄÂë±íÖРȥÕÒ£¬±£Ö¤ÕÒ²»µ½)£¬Õâ¸ö×ÖÔÚGBKÖС£È»ºóÄã°ÑËü·Åµ½Ò»¸öhtmlÒ³ÃæÖУ¬ÊÔ×ÅÔÚä¯ÀÀÆ÷Öдò¿ªËü£¬È»ºóÑ¡Ôñä¯ÀÀÆ÷µÄ±àÂëΪ“GB2312”£¬¿´µ½ÁËʲ ô?ËüÍêÈ«Õý³£ÏÔʾ!
¡¡¡¡½áÂÛ²»ÓÃÎÒ˵ÄãÒ²Ã÷°×ÁË£¬ä¯ÀÀÆ÷ʵ¼ÊÉÏʹÓõÄÊÇGBKÀ´ÏÔʾ¡£
¡¡¡¡ÐÂÀ˵ÄÒ³ÃæÖÐÒ²ÓкܶàÕâÑùµÄÀý×Ó£¬µ½´¦¶¼Ð´charset=GB2312£¬È´Ê¹ÓÃÁËÎÞÊý¸öGB2312Öв¢²»´æÔÚµÄ×Ö·û¡£ÕâÖÖ×ö·¨¶Ôä¯ÀÀÆ÷ÏÔʾ Ò³Ãæ²¢²»³ÉÎÊÌ⣬µ«ÔÚÐèÒª³ÌÐòץȡҳÃæ²¢±£´æµÄʱºò´øÀ´ÁËÂé·³£¬³ÌÐò½«²»ÄÜÒÀ¾ÝÒ³ÃæËù“Éù³Æ”µÄ±àÂë½øÐжÁÈ¡ºÍ±£´æ£¬¶øÖ»Äܾ¡Á¿²Â²âÕýÈ·µÄ±àÂë¡£
Ò»¸öÍøÒ³ÒªÏëÔÚä¯ÀÀÆ÷ÖÐÄܹ»ÕýÈ·ÏÔʾ£¬ÐèÒªÔÚÈý¸öµØ·½±£³Ö±àÂëµÄÒ»Ö£ºÍøÒ³Îļþ£¬ÍøÒ³±àÂëÉùÃ÷ºÍä¯ÀÀÆ÷±àÂëÉèÖá£
¡¡¡¡Ê×ÏÈÊÇÍøÒ³Îļþ±¾ÉíµÄ±àÂ룬¼´ÍøÒ³ÎļþÔÚ±»´´½¨µÄʱºòʹÓÃʲô±àÂëÀ´±£´æ¡£Õâ¸öÍêÈ«È¡¾öÓÚ´´½¨¸ÃÍøÒ³µÄÈËԱʹÓÃÁËʲô±àÂë±£´æ£¬¶ø½øÒ»²½µÄÈ¡¾ö ÓÚ¸ÃÈËԱʹÓõIJÙ×÷ϵͳ¡£ÀýÈçÎÒÃÇʹÓõÄÖÐÎÄ°æWindowsXPϵͳ£¬µ±Äãн¨Ò»¸öÎı¾Îļþ£¬Ð´ÈëһЩÄÚÈÝ£¬²¢°´ÏÂctrl+s½øÐб£´æµÄÄÇÒ»¿Ì£¬²Ù×÷ ϵͳ¾ÍÌæÄãʹÓÃGBK±àÂ뽫Îļþ½øÐÐÁ˱£´æ(ûÓÐʹÓÃUTF-8£¬Ò²Ã»ÓÐʹÓÃUTF-16)¡£¶øʹÓÃÁËÓ¢ÎÄϵͳµÄÈË£¬ÏµÍ³»áʹÓÃISO-8859-1½øÐÐ ±£´æ£¬ÕâÒ²Òâζ×Å£¬ÔÚÓ¢ÎÄϵͳµÄÎļþÖÐÈç¹ûÊäÈëÒ»¸öºº×Ö£¬ÊÇÎÞ·¨½øÐб£´æµÄ(µ±È»£¬ÄãÉõÖ


Ïà¹ØÎĵµ£º

java ¶àÏß³Ì

 package server;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Recta ......

Java Òì³£´¦Àí

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
public class ExceptionDefaultHandler
{
private final static String _relativeExceptionLogPath = "log";
private final static String _defaultExceptionLogFileName = "exception.log";
......

ÔÚJavaÓ¦ÓóÌÐòÖÐʹÓÃJfreechartÅäÖÃ[z]

ÕªÒª£º±¾ÎĽ«Ì¸Ì¸ÔÚJavaÓ¦ÓóÌÐòÖÐʹÓÃJfreechartÅäÖã¬JFreeChartÊÇÓÃJava¿ª·¢µÄÒ»¸öÃâ·ÑµÄchartͼÐδ¦ÀíÀà¿â¡£
²âÊÔ»·¾³£º
OS¡¡£ºWindowsXP
Java£ºjdk1.5.0_06
JFreeChart£º1.0.9£¨2008Äê3Ô¡¡×îа汾£©
ÒòΪJFreeChart²ÉÓÃJava¿ª·¢¶ø³É£¬ËùÒÔÔÚÆäËûϵͳҲÄÜÕý³£ÔËÐС£
JFreeChartµÄ°²×°
1£¬ÏÂÔØ
´ÓSourceforge. ......

ÔÚEclipseºÍNetBeansÖе¼ÈëJava API

 ¹¤ÓûÉÆÆäÊ£¬±ØÏÈÀûÆäÆ÷¡£ÊìϤ¿ª·¢»·¾³¿ÉÒÔÈÃÄã¸ü¿ì¸üºÃ¸üÊæ·þµØ¿ª·¢Èí¼þ¡£¾ÍÈçͬVC/.net¿ª·¢ÈËÔ±Àë²»¿ªmsdn£¬java¿ª·¢ÈËÔ±ÍùÍùÒ²Àë²»¿ªjava API¡£ÏÂÃæ½éÉÜÏÂÈçºÎÔÚEclipseºÍNetBeansÖе¼Èëjava API¡£Ê¹Ö®¿ÉÒÔ·½±ã¿ìËٵزéÕÒ£¬¶¨Î»¡£
¡¡¡¡±¾ÎÄÊʺÏÓë¸Õ¸Õ½Ó´¥Eclipse»òNetBeansµÄjava¿ª·¢ÈËÔ±£¬»òÕßÊÇÓо­ÑéµÄʹÓÃEc ......

JavaÊý¾Ý¿â°üjava.sql.*Ïê½â(jdk1.6)

1:Ó¦ÓóÌÐò²»ÔÙÐèҪʹÓà Class.forName() ÏÔʽµØ¼ÓÔØ JDBC Çý¶¯³ÌÐò¡£µ±Ç°Ê¹Óà Class.forName() ¼ÓÔØ JDBC Çý¶¯³ÌÐòµÄÏÖÓгÌÐò½«ÔÚ²»×÷Ð޸ĵÄÇé¿öϼÌÐø¹¤×÷¡£
2:ÐèҪעÒâÒÔÏÂÃüÁ
executeUpdate£ºÊÇ×î»ù´¡µÄÊý¾Ý¿âµÄ¸üС¢²åÈëºÍɾ³ý²Ù×÷¡£Ð§ÂʵÍÏ¡£   
executeQuery£ºÊÇ×î»ù´¡µÄÖ´ÐвéѯÓï¾ä£¬Í¬Ñù ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ