javaÐéÄâ»úʹÓÃÄÚ´æµÄ˼¿¼
¹ØÓÚjavaÐéÄâ»úʹÓÃÄÚ´æµÄ˼¿¼
JVM(javaÐéÄâ»ú)Æäʵ¾ÍÊDzÙ×÷ϵͳ(Èçwindows)ÉϵÄÒ»¸öÆÕͨ³ÌÐò(½ø³ÌÃû½Ðjava,Õâ¸ö³ÌÐò¿ÉÒÔ½âÊÍÖ´ÐÐclassÎļþ)¡£
µ±java½ø³ÌÆô¶¯Ê±»áÊ×ÏÈ·ÖÅäÒ»¿é¶ÑÄڴ棨×îСÄڴ棩£¬ÒÔºóÿµ±class×Ö½ÚÂë³ÌÐòÒªÇóJVM(java½ø³Ì)·ÖÅäÄÚ´æʱ£¬JVM
¾Í»áÔÚÔ¤ÏÈ·ÖÅäµÄÄÇ¿éÄÚ´æÉÏÃæΪclass×Ö½ÚÂë³ÌÐò·ÖÅäÄڴ棬µ±Ô¤ÏÈ·ÖÅäµÄÄÇ¿éÄÚ´æÓÃûʱ£¬JVM»áÔÙÏò²Ù×÷ϵͳҪÄÚ´æ
£¨ÎïÀíÄڴ棩£¬ µ«ÊÇJVM²»»áÎÞÏÞÖƵÄÏò²Ù×÷ϵͳҪÄڴ棬µ±ËüÕ¼ÓõÄʵ¼Ê¶ÑÄÚ´æ´ïµ½Ò»¸öÔ¤¶¨Öµ£¨×î´ó¿ÉÓÃÄڴ棩ʱ£¬
Èç¹ûclass×Ö½ÚÂë³ÌÐò»¹ÏòJVMÒªÄڴ棬²¢ÇÒJVMÎÞ·¨Í¨¹ý»ØÊÕµ±Ç°¶ÑÖеÄÄÚ´æÀ´Îªclass×Ö½ÚÂë³ÌÐò·þÎñʱ£¬Ëü¾Í»á¸ø³Ì
ÐòÅ׳öjava.lang.OutOfMemoryError¡£ÆäÖÐÄÚ´æ»ØÊÕʱ»ú²¢²»ÊÇÔÙÓõôÄÚ´æ´ïµ½×î´ó¿ÉÓÃÄÚ´æʱ²Å½øÐУ¬ËûµÄÔËÐÐʱ»úÊÇ
²»È·¶¨µÄ£¬¿É¼ûJVMµÄ×î´ó¿ÉÓÃÄÚ´æ¾ÍÊÇÄãµÄjava³ÌÐò£¨class×Ö½ÚÂë³ÌÐò£©Äܹ»Ê¹ÓõÄ×î´óÄÚ´æ¡£
ÀýÈ磺Äã°Ñjvm×î´ó¿ÉÓÃÄÚ´æÉèΪ200M,¶øÄãµÄÎïÀíÄÚ´æ1G.ÔÚÕâÖÖ³ÌÐòÏÂÄãµÄclass³ÌÐò×î¶àÄÜʹÓÃ200MÄڴ棬ËäÈ»Äã¿ÉÄÜ
»¹ÓÐ800MÄÚ´æ¿ÉÓ㬵«Êǵ±ÄãµÄ³ÌÐòÓõô200MºóÈç¹ûÔÙÒªÄڴ棬JVM²»»áÒòΪÄ㻹ÓÐ800MÄÚ´æ¶øΪÄã·ÖÅäÄڴ棬Ëû»áÏòÄãÅ×
³öjava.lang.OutOfMemoryError .
ËùÒÔJVM×î´ó¿ÉÓÃÄÚ´æ²ÎÊý±È½ÏÖØÒª¡£
Ò»°ã½¨Òé¶ÑµÄ×î´óÖµÉèÖÃΪ¿ÉÓÃÄÚ´æµÄ×î´óÖµµÄ80%¡£
£¨ÒÔÏÂΪתÍøÂ磩
TomcatĬÈÏ¿ÉÒÔʹÓõÄÄÚ´æΪ64MB£¬ÔڽϴóÐ͵ÄÓ¦ÓÃÏîÄ¿ÖУ¬ÕâµãÄÚ´æÊDz»¹»µÄ£¬ÐèÒªµ÷´ó¡£
WindowsÏ£¬ÔÚÎļþ{tomcat_home}/bin/catalina.bat£¬UnixÏ£¬ÔÚÎļþ{tomcat_home}/bin/catalina.shµÄÇ°Ã棬
Ôö¼ÓÈçÏÂÉèÖãº
set JAVA_OPTS=-Xms¡¾³õʼ»¯ÄÚ´æ´óС¡¿ -Xmx¡¾¿ÉÒÔʹÓõÄ×î´óÄÚ´æ¡¿
ÐèÒª°ÑÕâ¸öÁ½¸ö²ÎÊýÖµµ÷´ó¡£ÀýÈ磺 set JAVA_OPTS=-Xms64m -Xmx256m
±íʾ³õʼ»¯ÄÚ´æΪ256MB£¬¿ÉÒÔʹÓõÄ×î´óÄÚ´æΪ512MB¡£
ÁíÍâÐèÒª¿¼ÂǵÄÊÇJavaÌṩµÄÀ¬»ø»ØÊÕ»úÖÆ¡£ÐéÄâ»úµÄ¶Ñ´óС¾ö¶¨ÁËÐéÄâ»ú»¨·ÑÔÚÊÕ¼¯À¬»øÉϵÄʱ¼äºÍƵ¶È¡£ÊÕ¼¯À¬»ø¿É
ÒÔ½ÓÊܵÄËÙ¶ÈÓëÓ¦ÓÃÓйأ¬Ó¦¸Ãͨ¹ý·ÖÎöʵ¼ÊµÄÀ¬»øÊÕ¼¯µÄʱ¼äºÍƵÂÊÀ´µ÷Õû¡£Èç¹û¶ÑµÄ´óСºÜ´ó£¬ÄÇôÍêÈ«À¬»øÊÕ¼¯¾Í
»áºÜÂý£¬µ«ÊÇƵ¶È»á½µµÍ¡£Èç¹ûÄã°Ñ¶ÑµÄ´óСºÍÄÚ´æµÄÐèÒªÒ»Ö£¬ÍêÈ«ÊÕ¼¯¾ÍºÜ¿ì£¬µ«ÊÇ»á¸ü¼ÓƵ·±¡£µ÷Õû¶Ñ´óСµÄµÄÄ¿
µÄÊÇ×îÐ
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
Berkely DB¶ÔÓڸ߲¢·¢¡¢ÒªÇóËٶȿìµÄÓ¦ÓÃÀ´ËµÊǸö²»´íµÄÑ¡Ôñ£¬mysql¾ÍÊÇÓÃBDBʵÏÖµÄ(mysqlµÄºǫ́) £¬mysql¿ì£¬BDB±Èmysql»¹Òª¿ìN±¶¡£BDBÊÇÒ»ÖÖǶÈëʽµÄ¡¢·Ç¹ØϵÊý¾Ý¿â£¬ËüÓëÆäËûµÄ¹ØϵÊý¾Ý¿âRMDBS²»Í¬,ËüûÓÐÌṩSQL,¶øÊÇÌṩÁË×Ô¼ºµÄ·ÃÎʽӿڡ£×÷ΪһÖÖǶÈëʽµÄÊý¾Ý¿â£¬ËüÊǽø³ÌÄÚģʽµÄ£¬Ò²¾ÍÊÇ˵ËüºÍÓ¦ÓóÌÐòÔÚͬһÄÚ´æ¿ ......
import sun.net.ftp.*;
import sun.net.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.io.*;
public class FtpApplet extends Applet
{
FtpClient aftp;
DataOutputStream outputs ;
TelnetInputStream ins;
TelnetOutputStream outs;
TextArea lsArea;
La ......
java Óï·¨:
JavaµÄ»ù±¾·ûºÅ£¨token£©
JavaµÄµ¥´Ê·ûºÅÓÐÎåÖÖ£º¹Ø¼ü×Ö¡¢±êʶ·û¡¢³£Á¿¡¢·Ö¸ô·ûºÍ²Ù×÷·û¡£
JavaµÄ×Ö·û¼¯
Java ²ÉÓÃÒ»ÖÖ³ÆΪunicodeµÄ×Ö·û¼¯£¬¸Ã×Ö·û¼¯ºÏÊÇÒ»ÖÖеıàÂë±ê×¼£¬Óë³£¼ûµÄASCIIÂëµÄÇø±ðÔÚÓÚ£º
unicodeʹÓÃ16λ¶þ½øÖƶø²»ÊÇ8λÀ´±íʾһ¸ö×Ö·û¡£
unicode×Ö·û¼¯ÖÐÔö¼ÓÁËÐí¶à·ÇÀ¶¡Óï×Ö·û¡£
......