»ùÓÚ JVMTI ʵÏÖ Java Ï̵߳ļà¿Ø
Ëæ×ŶàºË CPU µÄÈÕÒæÆÕ¼°£¬Ô½À´Ô½¶àµÄ Java Ó¦ÓóÌÐòʹÓöàÏ̲߳¢ÐмÆËãÀ´³ä·Ö·¢»ÓÕû¸öϵͳµÄÐÔÄÜ¡£¶àÏ̵߳ÄʹÓÃÒ²¸øÓ¦ÓóÌÐò¿ª·¢ÈËÔ±´øÀ´Á˾޴óµÄÌôÕ½£¬²»ÕýÈ·µØʹÓöàÏ߳̿ÉÄÜÔì³ÉÏß³ÌËÀËø»ò×ÊÔ´¾ºÕù£¬µ¼ÖÂϵͳ̱»¾¡£Òò´Ë£¬ÐèÒªÒ»ÖÖÔËÐÐʱÏ̼߳à¿Ø¹¤¾ßÀ´°ïÖú¿ª·¢ÈËÔ±Õï¶ÏºÍ¸ú×Ù Java Ïß³Ì״̬µÄÇл»¡£JDK 1.5 ¼°ÆäºóÐø°æ±¾ÌṩÁ˼à¿ØÐéÄâ»úÔËÐÐ״̬µÄ½Ó¿Ú JVMTI¡£±¾ÎÄÉîÈë·ÖÎöÁË JVM ÖÐµÄ Java Ïß³ÌÄ£ÐÍ£¬Éè¼ÆÁËÓÃÓÚ¼à¿ØÏß³Ì״̬Çл»µÄÄ£ÐÍ£¬²¢»ùÓÚ JVMTI ʵÏÖÁË¶Ô Java Ïß³ÌÇл»½øÐмà¿ØµÄ´úÀí³ÌÐò¡£
JVMTI ¹¤¾ß½Ó¿Ú
Ëæ×ŶàºË CPU ¼¼ÊõµÄ·¢Õ¹£¬¶àÏ̱߳à³Ì¼¼Êõ±»¹ã·ºµØÓ¦Ó㬴Ӷø³ä·Ö·¢»ÓÕû¸öϵͳµÄÐÔÄÜ¡£Java ÓïÑÔ¶Ô¶àÏ̱߳à³ÌÌṩÁËÓïÑÔ¼¶µÄÖ§³Ö£¬¿ÉÒÔ·½±ãµØ´´½¨¡¢ÔËÐС¢Ïú»ÙÏ̡߳£È»¶ø£¬¶àÏ̵߳ÄʹÓÃÒ²¸øÓ¦ÓóÌÐò¿ª·¢ÈËÔ±´øÀ´Á˾޴óµÄÌôÕ½£¬²»ÕýÈ·µØʹÓöàÏ߳̿ÉÄÜÔì³ÉÏß³ÌËÀËø»ò×ÊÔ´¾ºÕù£¬µ¼ÖÂϵͳ̱»¾¡£
ΪÁË°ïÖú Java ¿ª·¢ÈËÔ±Õï¶ÏºÍ¸ú×Ù Java Ïß³Ì״̬µÄÇл»£¬Sun ¹«Ë¾ÔÚ Java ¿ª·¢¹¤¾ß°ü£¨Java2 Software Development Kit, JDK£©1.5.0 °æ±¾ÖÐÒý½øÁË Java ÐéÄâ»ú¹¤¾ß½Ó¿Ú£¨Java Virtual Machine Toolkit Interface£¬JVMTI£©£¬ÓÃÓÚÌæ´úÔÚÏÈÇ°µÄ JDK °æ±¾ÖÐ×÷ΪÊÔÑ鹦ÄÜ´æÔÚµÄ Java ÐéÄâ»úÆÊÎö½Ó¿Ú£¨Java Virtual Machine Profiling Interface£¬JVMPI£©ºÍ Java ÐéÄâ»úµ÷ÊÔ½Ó¿Ú£¨Java Virtual Machine Debugging Interface£¬JVMDI£©¡£Í¨¹ý JVMTI ½Ó¿Ú¿ÉÒÔ´´½¨´úÀí³ÌÐò£¨Agent£©ÒÔ¼àÊӺͿØÖÆ Java Ó¦ÓóÌÐò£¬°üÀ¨ÆÊÎö¡¢µ÷ÊÔ¡¢¼à¿Ø¡¢·ÖÎöÏ̵߳ȵȣ¬Æä¼Ü¹¹Ä£ÐÍÈçͼ 1 Ëùʾ¡£
ͼ 1. JVMTI ¼Ü¹¹Ä£ÐÍ
Agent ¿ÉÒÔÏòÔËÐÐÖеÄÐéÄâ»úʵÀý¶©ÔĸÐÐËȤµÄʼþ£¬µ±ÕâЩʼþ·¢ÉúµÄʱºò£¬»áÒÔʼþ»Øµ÷º¯ÊýµÄ·½Ê½¼¤»î´úÀí³ÌÐò£¬Í¬Ê± JVMTI ÌṩÁËÖÚ¶àµÄ¹¦Äܺ¯Êý£¬ÒÔ²éѯºÍ¿ØÖÆ Java Ó¦ÓóÌÐòµÄÔËÐÐ״̬¡£Agent ͨ¹ý JVMTI ËùÌṩµÄ½Ó¿ÚÓëÐéÄâ»ú½øÐÐͨÐÅ£¬²¢Í¬²½¼à¿ØÐéÄâ»úµÄÔËÐÐ״̬£¬ËüÓëÔËÐÐÖÐµÄ Java Ó¦ÓóÌÐòÊÇÏà¶Ô¶ÀÁ¢µÄ£¬²»»á¸ÉÈųÌÐòµÄÕý³£ÔËÐС£Agent ¿ÉÒÔÓÃÈκÎÖ§³Ö C ÓïÑÔ±ê×¼µÄ±¾µØÓïÑÔÀ´±àд£¬²¢ÒÔ¶¯Ì¬Á´½Ó¿âµÄ·½Ê½´æÔÚ£»Java ³ÌÐòÆô¶¯µÄʱºò¿ÉÒÔ¼ÓÔØÕâ¸ö¶¯Ì¬Á´½Ó¿â¡£
»ùÓÚ JVMTI ½Ó¿Ú¹¹½¨µÄ Agent ¿ÉÒÔ·½±ãµØʵÏÖ¶Ô Java Ïß³Ì״̬Çл»µÄ¸ú×Ù£¬´Ó¶øʹ¿ª·¢ÈËÔ±Äܹ»ÔÚÔËÐÐʱÇå³þµØÁ˽â¶àÏß³ÌÓ¦ÓóÌÐòÖÐÏ̵߳Ť×÷Çé¿ö£¬·½±ã½øÐе÷ÊԺͳý´í¡£±¾ÎĺóÐø²¿·Ö½«½éÉÜÈçºÎ»ùÓÚ JVMTI ½Ó¿Ú¹¹½¨ Java Ïß³ÌÇл»¼à¿Ø´úÀí¡£
»ØÒ³Ê×
Java Ïß³ÌÄ£ÐÍ
Ò
Ïà¹ØÎĵµ£º
RMI (Remote Method Invocation£¬Ô¶³Ì·½·¨µ÷ÓÃ)ÈçºÎÓÃÓÚ³ÌÐò¼äͨѶ£¬ÁíÒ»¸öÓÃÓÚͨѶµÄ¼¼ÊõÊÇRuntime.exec() ·½·¨¡£Äã¿ÉÒÔÓÃÕâ¸ö·½·¨´ÓÒ»¸öÔËÐа¢java³ÌÐòÖе÷ÓÃÁíÒ»¸ö³ÌÐò¡£Runtime.exec Ò²ÔÊÐíÄãÖ´ÐкͳÌÐòÏà¹ØµÄ²Ù×÷£¬ÀýÈç¿ØÖƳÌÐòµÄ±ê×¼ÊäÈëÊä³ö£¬µÈ´ý³ÌÐòµÄ½áÊø²¢µÃµ½ËüµÄÍ˳ö״̬¡£ÏÂÃæÊÇÒ»¸ ......
import java.awt.*;
import java.awt.event.*;
public class TestFrame {
Frame fm = new Frame();
public void init(){
fm.setSize(300,300);
Button btn = new Button("ok");
fm.add(btn);
btn.addActionListener(ne ......
ÇëÎʸ÷λ´ó룬Èç¹ûÓÃJAVAÀ´ÖÆ×÷¶¯Ì¬µÄ¸öÈËÍøÕ¾£¬¶¼ÐèÒªÄÄЩ·½ÃæµÄ֪ʶºÍ×¼±¸¹¤×÷£¿¿ª·¢¹¤¾ßʹÓÃʲô±È½ÏºÃ£¬Eclipse»¹ÊÇMyEclipse¡¢»¹ÊÇNetBeans£¿Çë¸ßÊÖÖ¸½Ì……
ÒÔÇ°ÓÃEclipse×ö¹ý¹«Ë¾µÄÍøÕ¾£¬Ê±¼ä¸ôµÄÓÐЩ̫¾ÃÁË¡¢¶¼Íü¼ÇÊÇÔõÑùÒ»¸ö¹ý³ÌÁË¡£JSP¡¢SERLET¡¢HIBERNATE¡ ......
Java´úÂë
final TC[] ts = new TC[20];
for (int i = 0; i < ts.length; i++) {
......
Today , i take the first lesson of java ,let me sum up the details:
firstly,about jdk and jre.jdk stands for java development kit,while jre represent java Runtime Environment. jdk is the key of Java. And,jvm(java virtual machine) is the key of jre.
then ,about the platform independence of java.Dur ......