{"id":1970,"date":"2024-06-05T20:17:52","date_gmt":"2024-06-05T12:17:52","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/3820.html"},"modified":"2024-06-05T20:17:52","modified_gmt":"2024-06-05T12:17:52","slug":"%e4%bb%80%e4%b9%88%e6%98%af-java-%e8%99%9a%e6%8b%9f%e6%9c%ba%e5%8f%8a%e5%85%b6%e6%9e%b6%e6%9e%84%e4%ba%8c","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/knowledge\/jszc\/1970.html","title":{"rendered":"\u4ec0\u4e48\u662f Java \u865a\u62df\u673a\u53ca\u5176\u67b6\u6784(\u4e8c)"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>Java VM\u4e2d\u7684Java\u4ee3\u7801\u7f16\u8bd1\u548c\u6267\u884c<\/p>\n<p>\u73b0\u5728\u5728\u8fd9\u4e2a JVM \u6559\u7a0b\u4e2d\uff0c\u8ba9\u6211\u4eec\u770b\u770b JAVA \u7684\u8fc7\u7a0b\u3002\u5728\u4f60\u7684\u4e3b\u8981\uff0c\u4f60\u6709\u4e24\u4e2a\u65b9\u6cd5 f1 \u548c f2\u3002raksmart<a href=\"https:\/\/cn.raksmart.com\/\" target=\"_blank\" rel=\"noopener\"><strong>\u65b0\u52a0\u5761\u670d\u52a1\u5668<\/strong><\/a>\u4e3a\u60a8\u5206\u4eab\u4ec0\u4e48\u662f Java \u865a\u62df\u673a\u53ca\u5176\u67b6\u6784\uff1a<\/p>\n<p>main\u65b9\u6cd5\u5b58\u653e\u5728\u6587\u4ef6a1.java\u4e2d<\/p>\n<p>f1 \u4f5c\u4e3a a2.java \u5b58\u50a8\u5728\u6587\u4ef6\u4e2d<\/p>\n<p>f2 \u4f5c\u4e3a a3.java \u5b58\u50a8\u5728\u6587\u4ef6\u4e2d<\/p>\n<p>\u7f16\u8bd1\u5668\u5c06\u7f16\u8bd1\u8fd9\u4e09\u4e2a\u6587\u4ef6\u5e76\u751f\u6210 3 \u4e2a\u5bf9\u5e94\u7684\u7531 BYTE \u4ee3\u7801\u7ec4\u6210\u7684 .class \u6587\u4ef6\u3002 \u4e0e C \u4e0d\u540c\uff0c\u6ca1\u6709\u8fdb\u884c\u94fe\u63a5\u3002<\/p>\n<p>Java VM \u6216 Java \u865a\u62df\u673a\u9a7b\u7559\u5728 RAM \u4e0a\u3002\u5728\u6267\u884c\u671f\u95f4\uff0c\u4f7f\u7528\u7c7b\u52a0\u8f7d\u5668\u5c06\u7c7b\u6587\u4ef6\u5e26\u5230 RAM \u4e2d\u3002BYTE \u4ee3\u7801\u5df2\u9488\u5bf9\u4efb\u4f55\u5b89\u5168\u6f0f\u6d1e\u8fdb\u884c\u9a8c\u8bc1\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6267\u884c\u5f15\u64ce\u4f1a\u5c06 Bytecode \u8f6c\u6362\u4e3a Native \u673a\u5668\u7801\u3002\u8fd9\u662f\u53ca\u65f6\u7f16\u8bd1\u3002\u8fd9\u662fJava\u76f8\u5bf9\u8f83\u6162\u7684\u4e3b\u8981\u539f\u56e0\u4e4b\u4e00\u3002<\/p>\n<p>\u6ce8\u610f\uff1a JIT\u6216\u5373\u65f6\u7f16\u8bd1\u5668\u662f Java \u865a\u62df\u673a (JVM) \u7684\u4e00\u90e8\u5206\u3002\u5b83\u540c\u65f6\u89e3\u91ca\u5177\u6709\u76f8\u4f3c\u529f\u80fd\u7684\u90e8\u5206\u5b57\u8282\u7801\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48Java\u65e2\u662f\u89e3\u91ca\u8bed\u8a00\u53c8\u662f\u7f16\u8bd1\u8bed\u8a00?<\/p>\n<p>\u7f16\u7a0b\u8bed\u8a00\u88ab\u5206\u7c7b\u4e3a<\/p>\n<p>\u9ad8\u7ea7\u8bed\u8a00 \u4f8b\u5982\u3002C++\u3001Java<\/p>\n<p>\u4e2d\u7ea7\u8bed\u8a00 \u4f8b\u5982\u3002C<\/p>\n<p>\u4f4e\u7ea7\u8bed\u8a00 Ex \u6c47\u7f16<\/p>\n<p>\u6700\u540e\u662f\u673a\u5668\u8bed\u8a00\u7684\u6700\u4f4e\u7ea7\u522b\u3002<\/p>\n<p>\u7f16\u8bd1\u5668\u662f\u5c06\u7a0b\u5e8f\u4ece\u4e00\u79cd\u8bed\u8a00\u7ea7\u522b\u8f6c\u6362\u4e3a\u53e6\u4e00\u79cd\u8bed\u8a00\u7684\u7a0b\u5e8f\u3002\u5c06 C++ \u7a0b\u5e8f\u8f6c\u6362\u4e3a\u673a\u5668\u4ee3\u7801\u7684\u793a\u4f8b\u3002<\/p>\n<p>java\u7f16\u8bd1\u5668\u5c06\u9ad8\u7ea7java\u4ee3\u7801\u8f6c\u6362\u6210\u5b57\u8282\u7801(\u4e5f\u662f\u673a\u5668\u7801\u7684\u4e00\u79cd)\u3002<\/p>\n<p>\u89e3\u91ca\u5668\u662f\u5c06\u4e00\u4e2a\u7ea7\u522b\u7684\u7a0b\u5e8f\u8f6c\u6362\u4e3a\u540c\u4e00\u7ea7\u522b\u7684\u53e6\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684\u7a0b\u5e8f\u3002Java \u7a0b\u5e8f\u5230 C++ \u7684\u8f6c\u6362\u793a\u4f8b<\/p>\n<p>\u5728 Java \u4e2d\uff0cJust In Time Code \u751f\u6210\u5668\u5c06\u5b57\u8282\u7801\u8f6c\u6362\u4e3a\u5177\u6709\u76f8\u540c\u7f16\u7a0b\u7ea7\u522b\u7684\u672c\u673a\u673a\u5668\u7801\u3002<\/p>\n<p>\u56e0\u6b64\uff0cJava \u65e2\u662f\u7f16\u8bd1\u8bed\u8a00\u53c8\u662f\u89e3\u91ca\u8bed\u8a00\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48Java\u6162?<\/p>\n<p>Java\u8fd0\u884c\u7f13\u6162\u7684\u4e24\u4e2a\u4e3b\u8981\u539f\u56e0\u662f<\/p>\n<p>\u52a8\u6001\u94fe\u63a5\uff1a \u4e0e C \u4e0d\u540c\uff0c\u94fe\u63a5\u662f\u5728\u8fd0\u884c\u65f6\u5b8c\u6210\u7684\uff0c\u6bcf\u6b21\u7a0b\u5e8f\u5728 Java \u4e2d\u8fd0\u884c\u65f6\u3002<\/p>\n<p>\u8fd0\u884c\u65f6\u89e3\u91ca\u5668\uff1a \u5b57\u8282\u7801\u5230\u672c\u673a\u673a\u5668\u7801\u7684\u8f6c\u6362\u662f\u5728\u8fd0\u884c\u65f6\u5728 Java \u4e2d\u5b8c\u6210\u7684\uff0c\u8fd9\u8fdb\u4e00\u6b65\u51cf\u6162\u4e86\u901f\u5ea6<\/p>\n<p>\u7136\u800c\uff0c\u6700\u65b0\u7248\u672c\u7684 Java \u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u89e3\u51b3\u4e86\u6027\u80fd\u74f6\u9888\u3002<\/p>\n<p>\u6458\u8981\uff1a<\/p>\n<p>JVM \u7684\u5b8c\u6574\u5f62\u5f0f\u662f Java \u865a\u62df\u673a\u3002Java \u4e2d\u7684 JVM \u662f\u9a71\u52a8 Java \u4ee3\u7801\u7684\u5f15\u64ce\u3002\u5b83\u5c06 Java \u5b57\u8282\u7801\u8f6c\u6362\u4e3a\u673a\u5668\u8bed\u8a00\u3002<\/p>\n<p>Java\u4e2d\u7684JVM\u67b6\u6784\u5305\u542b\u7c7b\u52a0\u8f7d\u5668\u3001\u5185\u5b58\u533a\u57df\u3001\u6267\u884c\u5f15\u64ce\u7b49\u3002<\/p>\n<p>\u5728 JVM \u4e2d\uff0cJava \u4ee3\u7801\u88ab\u7f16\u8bd1\u4e3a\u5b57\u8282\u7801\u3002\u8fd9\u4e2a\u5b57\u8282\u7801\u5728\u4e0d\u540c\u7684\u673a\u5668\u4e0a\u88ab\u89e3\u91ca<\/p>\n<p>JIT \u4ee3\u8868\u5373\u65f6\u7f16\u8bd1\u5668\u3002JIT \u662f Java \u865a\u62df\u673a (JVM) \u7684\u4e00\u90e8\u5206\u3002\u5b83\u7528\u4e8e\u52a0\u5feb\u6267\u884c\u65f6\u95f4<\/p>\n<p>\u4e0e\u5176\u4ed6\u7f16\u8bd1\u5668\u673a\u5668\u76f8\u6bd4\uff0cJava \u4e2d\u7684 JVM \u53ef\u80fd\u6267\u884c\u901f\u5ea6\u8f83\u6162\u3002\u63a8\u8350\u76f8\u5173\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/1954.html\">\u300a\u4ec0\u4e48\u662f Java \u865a\u62df\u673a\u53ca\u5176\u67b6\u6784\u300b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java VM\u4e2d\u7684Java\u4ee3\u7801\u7f16\u8bd1\u548c\u6267\u884c \u73b0\u5728\u5728\u8fd9\u4e2a JVM \u6559\u7a0b\u4e2d\uff0c\u8ba9\u6211\u4eec\u770b\u770b JAVA \u7684\u8fc7\u7a0b\u3002\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[809],"class_list":["post-1970","post","type-post","status-publish","format-standard","hentry","category-jszc","tag-java"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=1970"}],"version-history":[{"count":0,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1970\/revisions"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=1970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=1970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=1970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}