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

Jconsole ºÍ jps ÎÞ·¨ÏÔʾ±¾µØ Java ½ø³ÌÁбí

Ç°Ò»ÕóÔÚ¹«Ë¾ÀïʹÓà jconsle ʱһÇÐÕý³££¬È»¶øÔÚ¼ÒÖеĻúÆ÷ÉÏÈ´³öÏÖÁ˱êÌâËùʾµÄÎÊÌ⣺
jconsole ºÍ jps ÎÞ·¨ÏÔʾ±¾µØ Java ½ø³ÌÁÐ±í¡£
µ±Ê±Ö±½ÓÀûÓà -Dcom.sun.management.jmxremote.port=port Æô¶¯Ä¿±ê java ½ø³Ì£¬²¢ÔÚ jconsole ÖÐͨ¹ý localhost:port ·½Ê½³É¹¦Á¬½ÓÉÏÄ¿±ê java ½ø³Ì¡£ÓÐÁËÕâ¸ö work around Ö®ºó£¬¶ÔÕâ¸öÎÊÌâÒ²¾ÍûÓÐÌ«ÔÚÒâ¡£
ÆäʵÕâ¸öÎÊÌâµÄÕý½âÈçÏ£º
ÔÚ Win32 ϵͳÉÏ£¬Ã¿¸ö java ½ø³ÌÆô¶¯Ö®ºó¶¼ÔÚ %TMP%\hsperfdata_user £¨ user Ϊµ±Ç°µÇ¼Óû§Ãû£©Ä¿Â¼Ï½¨Á¢Ò»¸öÒԸà java ½ø³Ì pid ΪÎļþÃûµÄÎļþ£¬ÓÃÒԼǼ¸Ã java ½ø³ÌµÄһЩÐÅÏ¢¡£¶ø jconsole ºÍ jps ÕýÊÇÀûÓÃÕâЩÎļþÀ´»ñÈ¡µ±Ç°ÏµÍ³ÖÐ java ½ø³ÌµÄÐÅÏ¢µÄ¡£¸ù¾Ý
http://java.sun.com/j2se/1.5.0/docs/guide/management/faq.html#win1
µÄ½âÊÍ£¬Èç¹û¸ÃĿ¼λÓÚ FAT ÎļþϵͳÏ£¬»òÕßλÓÚ NTFS ÎļþϵͳÏ£¬µ«µ±Ç°Óû§¶Ô %TMP%\hsperfdata_user Ŀ¼µÄ·ÃÎÊȨÏÞ²»×㣬ÎÞ·¨´´½¨ºÍдÈë¸ÃÎļþ£¬jconsole ºÍ jps ¾ÍץϹÁË¡£
ÔÚ hsperfdata_user Ŀ¼ÏÂÊÖ¶¯ÊÔһϣ¬¿´ÊÇ·ñ¿ÉÒÔ´´½¨Îļþ£¬¾ÍÖªµÀµ±Ç°Óû§¶Ô¸ÃĿ¼ÊÇ·ñÓµÓжÁдȨÏÞÁË¡£
ÎÒµÄÇé¿öÊôÓÚµÚ¶þÖÖ£¬½â¾ö·½·¨×ÔÈ»ÊǶԸø¸ÃĿ¼½øÐÐÕýÈ·µÄ NTFS ȨÏÞÉèÖ㬷½·¨Óв»ÉÙ£¬±ÈÈç¿ÉÒÔÀûÓà cygwin Ï嵀 chmod À´¼ä½ÓÐÞ¸Ä NTFS µÄ ACL £¬»òÕßÖ±½ÓʹÓà cacls À´ÉèÖøÃĿ¼µÄ ACL£º
cacls %TMP%\hsperfdata_user /G Everyone:F
ÒÔÉÏÃüÁîÊǶÔËùÓÃÓû§¸³ÓèÄ¿±êĿ¼µÄËùÓзÃÎÊȨÏÞ——Õâô×ö×ÔÈ»ÊÇ͵ÁËÀÁ……µ«Êǵ±³õ¿´ cygwin ÊÖ²áµÄʱºò¾Í±» NTFS µÄ ACL µÄ¸´ÔӶȸøÏŵ½ÁË£¬Ò»Ê±°ë»á¶ùʵÔÚ²»ÏëÉÕâ¸öÍæÒâ¶ù……
ÁíÍ⣬Ϊʲô¸ÃĿ¼λÓÚ FAT ÎļþϵͳÏÂÒ²»á³öÎÊÌ⣬ÎÒ»¹²»ÖªµÀ¾ßÌåÔ­Òò¡£


Ïà¹ØÎĵµ£º

¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ10ÕÂ

µÚ10Õ ÍøÂçÓëÊý¾Ý¿â±à³Ì»ù´¡
(Ò»)¿Î³ÌÄÚÈÝ
10.1 JavaÍøÂç±à³Ì»ù´¡
10.1.1 IPµØÖ·ºÍInetAddressÀà
10.1.2ͳһ×ÊÔ´¶¨Î»·ûURL
10.1.3¿Í»§»ú/·þÎñÆ÷ģʽ
l0.2 JavaÊý¾Ý¿â±à³Ì»ù´¡
10.2.1 Java³ÌÐòÓëÊý¾Ý¿âÁ¬½Ó
10.2.2¼¸¸öÖØÒªµÄÀàºÍ½Ó¿Ú
10.2.3Êý¾Ý¿â²éѯ
10.2.4Êý¾Ý¿â¸üÐÂ
(¶þ)ѧϰĿµÄÓëÒªÇó
±¾Õ½éÉÜJavaÍøÂç± ......

JAVA»·¾³±äÁ¿ÉèÖÃ

¾ÙÀý×Ó˵Ã÷Ò»ÇС£
JAVA_HOME£º C:\j2sdk1.4.2_13
 
Path£º         C:\j2sdk1.4.2_13\bin;
Classpath£º.;JAVA_HOME\lib\tools.jar ; JAVA_HOME\lib\dt.jar;
                 &n ......

javaʱ¼ä¶¯Ì¬ÏÔʾ Á½ÖÖ·½·¨

ʱ¼ä¶¯Ì¬ÏÔʾ
1.·½·¨Ò» ÓÃTimerTask
ÀûÓÃjava.util.TimerºÍjava.util.TimerTaskÀ´×ö¶¯Ì¬¸üУ¬±Ï¾¹Ã¿´Î¸üпÉÒÔ¿´×÷ÊǼÆʱ1Ãë·¢ÉúÒ»´Î¡£
´úÂëÈçÏ£º
import java.awt.Dimension;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util ......

Java֮staticѧϰ

¶ÔÓÚѧϰstaticÎÒÃÇÏÈÀ´¿´Á½¸öÀý×Ó£º
//Example 1 Tst.java£¬no main() method
package com.blogchina.qb2049;
public class Tst
{
static { System.out.println("111111"); }
}
ÔËÐнá¹ûΪ: 111111
Exception in thread "main" java.lang.NoSuchMethodError: main
ͬÑùµÄµÀÀí¿´µÚ¶þ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ