{"id":1819,"date":"2022-02-05T19:36:52","date_gmt":"2022-02-05T11:36:52","guid":{"rendered":"https:\/\/www.zeroheart.xyz\/wordpress\/?p=1819"},"modified":"2022-02-07T10:14:10","modified_gmt":"2022-02-07T02:14:10","slug":"%e5%bc%95%e7%94%a8%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.zeroheart.xyz\/wordpress\/?p=1819","title":{"rendered":"\u5f15\u7528\u7c7b\u578b"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"\u56db\u79cd\u5f15\u7528\u7c7b\u578b\">\u56db\u79cd\u5f15\u7528\u7c7b\u578b<\/h1>\n\n\n\n<p>\u6240\u4ee5\u5728 JDK.1.2 \u4e4b\u540e\uff0cJava \u5bf9\u5f15\u7528\u7684\u6982\u5ff5\u8fdb\u884c\u4e86\u6269\u5145\uff0c\u5c06\u5f15\u7528\u5206\u4e3a\u4e86\uff1a\u5f3a\u5f15\u7528\uff08Strong Reference\uff09\u3001\u8f6f\u5f15\u7528\uff08Soft Reference\uff09\u3001\u5f31\u5f15\u7528\uff08Weak Reference\uff09\u3001\u865a\u5f15\u7528\uff08Phantom Reference\uff094 \u79cd\uff0c\u8fd9 4 \u79cd\u5f15\u7528\u7684\u5f3a\u5ea6\u4f9d\u6b21\u51cf\u5f31\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"262\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-3-1024x262.png\" alt=\"\" class=\"wp-image-1822\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-3-1024x262.png 1024w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-3-300x77.png 300w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-3-768x196.png 768w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-3-1200x307.png 1200w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-3.png 1432w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e00\u5f3a\u5f15\u7528\">\u4e00\uff0c\u5f3a\u5f15\u7528<\/h2>\n\n\n\n<p>Java\u4e2d\u9ed8\u8ba4\u58f0\u660e\u7684\u5c31\u662f\u5f3a\u5f15\u7528\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>Object<\/strong> obj = <strong>new<\/strong> <strong>Object<\/strong>(); \/\/\u53ea\u8981obj\u8fd8\u6307\u5411Object\u5bf9\u8c61\uff0cObject\u5bf9\u8c61\u5c31\u4e0d\u4f1a\u88ab\u56de\u6536\nobj = null;  \/\/\u624b\u52a8\u7f6enull\n<\/code><\/pre>\n\n\n\n<p>\u53ea\u8981\u5f3a\u5f15\u7528\u5b58\u5728\uff0c\u5783\u573e\u56de\u6536\u5668\u5c06\u6c38\u8fdc\u4e0d\u4f1a\u56de\u6536\u88ab\u5f15\u7528\u7684\u5bf9\u8c61\uff0c\u54ea\u6015\u5185\u5b58\u4e0d\u8db3\u65f6\uff0cJVM\u4e5f\u4f1a\u76f4\u63a5\u629b\u51faOutOfMemoryError\uff0c\u4e0d\u4f1a\u53bb\u56de\u6536\u3002\u5982\u679c\u60f3\u4e2d\u65ad\u5f3a\u5f15\u7528\u4e0e\u5bf9\u8c61\u4e4b\u95f4\u7684\u8054\u7cfb\uff0c\u53ef\u4ee5\u663e\u793a\u7684\u5c06\u5f3a\u5f15\u7528\u8d4b\u503c\u4e3anull\uff0c\u8fd9\u6837\u4e00\u6765\uff0cJVM\u5c31\u53ef\u4ee5\u9002\u65f6\u7684\u56de\u6536\u5bf9\u8c61\u4e86<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e8c\u8f6f\u5f15\u7528\">\u4e8c\uff0c\u8f6f\u5f15\u7528<\/h2>\n\n\n\n<p>\u8f6f\u5f15\u7528\u662f\u7528\u6765\u63cf\u8ff0\u4e00\u4e9b\u975e\u5fc5\u9700\u4f46\u4ecd\u6709\u7528\u7684\u5bf9\u8c61\u3002<strong>\u5728\u5185\u5b58\u8db3\u591f\u7684\u65f6\u5019\uff0c\u8f6f\u5f15\u7528\u5bf9\u8c61\u4e0d\u4f1a\u88ab\u56de\u6536\uff0c\u53ea\u6709\u5728\u5185\u5b58\u4e0d\u8db3\u65f6\uff0c\u7cfb\u7edf\u5219\u4f1a\u56de\u6536\u8f6f\u5f15\u7528\u5bf9\u8c61\uff0c\u5982\u679c\u56de\u6536\u4e86\u8f6f\u5f15\u7528\u5bf9\u8c61\u4e4b\u540e\u4ecd\u7136\u6ca1\u6709\u8db3\u591f\u7684\u5185\u5b58\uff0c\u624d\u4f1a\u629b\u51fa\u5185\u5b58\u6ea2\u51fa\u5f02\u5e38<\/strong>\u3002\u8fd9\u79cd\u7279\u6027\u5e38\u5e38\u88ab\u7528\u6765\u5b9e\u73b0\u7f13\u5b58\u6280\u672f\uff0c\u6bd4\u5982\u7f51\u9875\u7f13\u5b58\uff0c\u56fe\u7247\u7f13\u5b58\u7b49\u3002<br>\u5728 JDK1.2 \u4e4b\u540e\uff0c\u7528java.lang.ref.SoftReference\u7c7b\u6765\u8868\u793a\u8f6f\u5f15\u7528\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u4ee5\u4e00\u4e2a\u4f8b\u5b50\u6765\u8fdb\u4e00\u6b65\u8bf4\u660e\u5f3a\u5f15\u7528\u548c\u8f6f\u5f15\u7528\u7684\u533a\u522b\uff1a<br>\u5728\u8fd0\u884c\u4e0b\u9762\u7684Java\u4ee3\u7801\u4e4b\u524d\uff0c\u9700\u8981\u5148\u914d\u7f6e\u53c2\u6570 -Xms2M -Xmx3M\uff0c\u5c06 JVM \u7684\u521d\u59cb\u5185\u5b58\u8bbe\u4e3a2M\uff0c\u6700\u5927\u53ef\u7528\u5185\u5b58\u4e3a 3M\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u5148\u6765\u6d4b\u8bd5\u4e00\u4e0b\u5f3a\u5f15\u7528\uff0c\u5728\u9650\u5236\u4e86 JVM \u5185\u5b58\u7684\u524d\u63d0\u4e0b\uff0c\u4e0b\u9762\u7684\u4ee3\u7801\u8fd0\u884c\u6b63\u5e38<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>public<\/strong> <strong>class<\/strong> <strong>TestOOM<\/strong> {\n\t\n\t<strong>public<\/strong> <strong>static<\/strong> <strong>void<\/strong> <strong>main<\/strong>(String&#91;] args) {\n\t\t testStrongReference();\n\t}\n\t<strong>private<\/strong> <strong>static<\/strong> <strong>void<\/strong> <strong>testStrongReference<\/strong>() {\n\t\t\/\/ \u5f53 new byte\u4e3a 1M \u65f6\uff0c\u7a0b\u5e8f\u8fd0\u884c\u6b63\u5e38\n\t\tbyte&#91;] buff = <strong>new<\/strong> byte&#91;1024 * 1024 * 1];\n\t}\n}\n<\/code><\/pre>\n\n\n\n<p>\u4f46\u662f\u5982\u679c\u6211\u4eec\u5c06<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>byte&#91;] buff = <strong>new<\/strong> byte&#91;1024 * 1024 * 1];\n<\/code><\/pre>\n\n\n\n<p>\u66ff\u6362\u4e3a\u521b\u5efa\u4e00\u4e2a\u5927\u5c0f\u4e3a 2M \u7684\u5b57\u8282\u6570\u7ec4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>byte&#91;] buff = <strong>new<\/strong> byte&#91;1024 * 1024 * 2];\n<\/code><\/pre>\n\n\n\n<p>\u5219\u5185\u5b58\u4e0d\u591f\u4f7f\u7528\uff0c\u7a0b\u5e8f\u76f4\u63a5\u62a5\u9519\uff0c\u5f3a\u5f15\u7528\u5e76\u4e0d\u4f1a\u88ab\u56de\u6536<br><img decoding=\"async\" src=\"https:\/\/img2018.cnblogs.com\/blog\/662236\/201809\/662236-20180922194052676-1646914311.png\" alt=\"\"><\/p>\n\n\n\n<p>\u63a5\u7740\u6765\u770b\u4e00\u4e0b\u8f6f\u5f15\u7528\u4f1a\u6709\u4ec0\u4e48\u4e0d\u4e00\u6837\uff0c\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\u8fde\u7eed\u521b\u5efa\u4e86 10 \u4e2a\u5927\u5c0f\u4e3a 1M \u7684\u5b57\u8282\u6570\u7ec4\uff0c\u5e76\u8d4b\u503c\u7ed9\u4e86\u8f6f\u5f15\u7528\uff0c\u7136\u540e\u5faa\u73af\u904d\u5386\u5c06\u8fd9\u4e9b\u5bf9\u8c61\u6253\u5370\u51fa\u6765\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>public<\/strong> <strong>class<\/strong> <strong>TestOOM<\/strong> {\n\t<strong>private<\/strong> <strong>static<\/strong> List&lt;Object&gt; list = <strong>new<\/strong> ArrayList&lt;&gt;();\n\t<strong>public<\/strong> <strong>static<\/strong> <strong>void<\/strong> <strong>main<\/strong>(String&#91;] args) {\n\t     testSoftReference();\n\t}\n\t<strong>private<\/strong> <strong>static<\/strong> <strong>void<\/strong> <strong>testSoftReference<\/strong>() {\n\t\t<strong>for<\/strong> (int i = 0; i &lt; 10; i++) {\n\t\t\tbyte&#91;] buff = <strong>new<\/strong> byte&#91;1024 * 1024];\n\t\t\tSoftReference&lt;byte&#91;]&gt; sr = <strong>new<\/strong> SoftReference&lt;&gt;(buff);\n\t\t\tlist.<strong>add<\/strong>(sr);\n\t\t}\n\t\t\n\t\tSystem.gc(); \/\/\u4e3b\u52a8\u901a\u77e5\u5783\u573e\u56de\u6536\n\t\t\n\t\t<strong>for<\/strong>(int i=0; i &lt; list.size(); i++){\n\t\t\tObject obj = ((SoftReference) list.<strong>get<\/strong>(i)).<strong>get<\/strong>();\n\t\t\tSystem.<strong>out<\/strong>.println(obj);\n\t\t}\n\t\t\n\t}\n\t\n}\n<\/code><\/pre>\n\n\n\n<p>\u6253\u5370\u7ed3\u679c\uff1a<br><img decoding=\"async\" src=\"https:\/\/img2018.cnblogs.com\/blog\/662236\/201809\/662236-20180922194016719-117632363.png\" alt=\"\"><\/p>\n\n\n\n<p>\u6211\u4eec\u53d1\u73b0\u65e0\u8bba\u5faa\u73af\u521b\u5efa\u591a\u5c11\u4e2a\u8f6f\u5f15\u7528\u5bf9\u8c61\uff0c\u6253\u5370\u7ed3\u679c\u603b\u662f\u53ea\u6709\u6700\u540e\u4e00\u4e2a\u5bf9\u8c61\u88ab\u4fdd\u7559\uff0c\u5176\u4ed6\u7684obj\u5168\u90fd\u88ab\u7f6e\u7a7a\u56de\u6536\u4e86\u3002<br>\u8fd9\u91cc\u5c31\u8bf4\u660e\u4e86\u5728\u5185\u5b58\u4e0d\u8db3\u7684\u60c5\u51b5\u4e0b\uff0c\u8f6f\u5f15\u7528\u5c06\u4f1a\u88ab\u81ea\u52a8\u56de\u6536\u3002<br>\u503c\u5f97\u6ce8\u610f\u7684\u4e00\u70b9 , \u5373\u4f7f\u6709 byte[] buff \u5f15\u7528\u6307\u5411\u5bf9\u8c61, \u4e14 buff \u662f\u4e00\u4e2astrong reference, \u4f46\u662f SoftReference sr \u6307\u5411\u7684\u5bf9\u8c61\u4ecd\u7136\u88ab\u56de\u6536\u4e86\uff0c\u8fd9\u662f\u56e0\u4e3aJava\u7684\u7f16\u8bd1\u5668\u53d1\u73b0\u4e86\u5728\u4e4b\u540e\u7684\u4ee3\u7801\u4e2d, buff \u5df2\u7ecf\u6ca1\u6709\u88ab\u4f7f\u7528\u4e86, \u6240\u4ee5\u81ea\u52a8\u8fdb\u884c\u4e86\u4f18\u5316\u3002<br>\u5982\u679c\u6211\u4eec\u5c06\u4e0a\u9762\u793a\u4f8b\u7a0d\u5fae\u4fee\u6539\u4e00\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t<strong>private<\/strong> <strong>static<\/strong> <strong>void<\/strong> <strong>testSoftReference<\/strong>() {\n\t\tbyte&#91;] buff = null;\n\n\t\t<strong>for<\/strong> (int i = 0; i &lt; 10; i++) {\n\t\t\tbuff = <strong>new<\/strong> byte&#91;1024 * 1024];\n\t\t\tSoftReference&lt;byte&#91;]&gt; sr = <strong>new<\/strong> SoftReference&lt;&gt;(buff);\n\t\t\tlist.<strong>add<\/strong>(sr);\n\t\t}\n\n        System.gc(); \/\/\u4e3b\u52a8\u901a\u77e5\u5783\u573e\u56de\u6536\n\t\t\n\t\t<strong>for<\/strong>(int i=0; i &lt; list.size(); i++){\n\t\t\tObject obj = ((SoftReference) list.<strong>get<\/strong>(i)).<strong>get<\/strong>();\n\t\t\tSystem.<strong>out<\/strong>.println(obj);\n\t\t}\n\n\t\tSystem.<strong>out<\/strong>.println(\"buff: \" + buff.toString());\n\t}\n\n<\/code><\/pre>\n\n\n\n<p>\u5219 buff \u4f1a\u56e0\u4e3a\u5f3a\u5f15\u7528\u7684\u5b58\u5728\uff0c\u800c\u65e0\u6cd5\u88ab\u5783\u573e\u56de\u6536\uff0c\u4ece\u800c\u629b\u51faOOM\u7684\u9519\u8bef\u3002<br><img decoding=\"async\" src=\"https:\/\/img2018.cnblogs.com\/blog\/662236\/201809\/662236-20180922194030314-105853688.png\" alt=\"\"><\/p>\n\n\n\n<p>\u5982\u679c\u4e00\u4e2a\u5bf9\u8c61\u60df\u4e00\u5269\u4e0b\u7684\u5f15\u7528\u662f\u8f6f\u5f15\u7528\uff0c\u90a3\u4e48\u8be5\u5bf9\u8c61\u662f\u8f6f\u53ef\u53ca\u7684\uff08softly reachable\uff09\u3002\u5783\u573e\u6536\u96c6\u5668\u5e76\u4e0d\u50cf\u5176\u6536\u96c6\u5f31\u53ef\u53ca\u7684\u5bf9\u8c61\u4e00\u6837\u5c3d\u91cf\u5730\u6536\u96c6\u8f6f\u53ef\u53ca\u7684\u5bf9\u8c61\uff0c\u76f8\u53cd\uff0c\u5b83\u53ea\u5728\u771f\u6b63 \u201c\u9700\u8981\u201d \u5185\u5b58\u65f6\u624d\u6536\u96c6\u8f6f\u53ef\u53ca\u7684\u5bf9\u8c61\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e09\u5f31\u5f15\u7528\">\u4e09\uff0c\u5f31\u5f15\u7528<\/h2>\n\n\n\n<p>\u5f31\u5f15\u7528\u7684\u5f15\u7528\u5f3a\u5ea6\u6bd4\u8f6f\u5f15\u7528\u8981\u66f4\u5f31\u4e00\u4e9b\uff0c<strong>\u65e0\u8bba\u5185\u5b58\u662f\u5426\u8db3\u591f\uff0c\u53ea\u8981 JVM \u5f00\u59cb\u8fdb\u884c\u5783\u573e\u56de\u6536\uff0c\u90a3\u4e9b\u88ab\u5f31\u5f15\u7528\u5173\u8054\u7684\u5bf9\u8c61\u90fd\u4f1a\u88ab\u56de\u6536<\/strong>\u3002\u5728 JDK1.2 \u4e4b\u540e\uff0c\u7528 java.lang.ref.WeakReference \u6765\u8868\u793a\u5f31\u5f15\u7528\u3002<br>\u6211\u4eec\u4ee5\u4e0e\u8f6f\u5f15\u7528\u540c\u6837\u7684\u65b9\u5f0f\u6765\u6d4b\u8bd5\u4e00\u4e0b\u5f31\u5f15\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t<strong>private<\/strong> <strong>static<\/strong> <strong>void<\/strong> <strong>testWeakReference<\/strong>() {\n\t\t<strong>for<\/strong> (int i = 0; i &lt; 10; i++) {\n\t\t\tbyte&#91;] buff = <strong>new<\/strong> byte&#91;1024 * 1024];\n\t\t\tWeakReference&lt;byte&#91;]&gt; sr = <strong>new<\/strong> WeakReference&lt;&gt;(buff);\n\t\t\tlist.<strong>add<\/strong>(sr);\n\t\t}\n\t\t\n\t\tSystem.gc(); \/\/\u4e3b\u52a8\u901a\u77e5\u5783\u573e\u56de\u6536\n\t\t\n\t\t<strong>for<\/strong>(int i=0; i &lt; list.size(); i++){\n\t\t\tObject obj = ((WeakReference) list.<strong>get<\/strong>(i)).<strong>get<\/strong>();\n\t\t\tSystem.<strong>out<\/strong>.println(obj);\n\t\t}\n\t}\n<\/code><\/pre>\n\n\n\n<p>\u6253\u5370\u7ed3\u679c\uff1a<br><img decoding=\"async\" src=\"https:\/\/img2018.cnblogs.com\/blog\/662236\/201809\/662236-20180922194112309-477100844.png\" alt=\"\"><\/p>\n\n\n\n<p>\u53ef\u4ee5\u53d1\u73b0\u6240\u6709\u88ab\u5f31\u5f15\u7528\u5173\u8054\u7684\u5bf9\u8c61\u90fd\u88ab\u5783\u573e\u56de\u6536\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u56db\u865a\u5f15\u7528\">\u56db\uff0c\u865a\u5f15\u7528<\/h2>\n\n\n\n<p>\u865a\u5f15\u7528\u662f\u6700\u5f31\u7684\u4e00\u79cd\u5f15\u7528\u5173\u7cfb\uff0c\u5982\u679c\u4e00\u4e2a\u5bf9\u8c61\u4ec5\u6301\u6709\u865a\u5f15\u7528\uff0c\u90a3\u4e48\u5b83\u5c31\u548c\u6ca1\u6709\u4efb\u4f55\u5f15\u7528\u4e00\u6837\uff0c\u5b83\u968f\u65f6\u53ef\u80fd\u4f1a\u88ab\u56de\u6536\uff0c\u5728 JDK1.2 \u4e4b\u540e\uff0c\u7528 PhantomReference \u7c7b\u6765\u8868\u793a\uff0c\u901a\u8fc7\u67e5\u770b\u8fd9\u4e2a\u7c7b\u7684\u6e90\u7801\uff0c\u53d1\u73b0\u5b83\u53ea\u6709\u4e00\u4e2a\u6784\u9020\u51fd\u6570\u548c\u4e00\u4e2a get() \u65b9\u6cd5\uff0c\u800c\u4e14\u5b83\u7684 get() \u65b9\u6cd5\u4ec5\u4ec5\u662f\u8fd4\u56de\u4e00\u4e2anull\uff0c\u4e5f\u5c31\u662f\u8bf4\u5c06\u6c38\u8fdc\u65e0\u6cd5\u901a\u8fc7\u865a\u5f15\u7528\u6765\u83b7\u53d6\u5bf9\u8c61\uff0c\u865a\u5f15\u7528\u5fc5\u987b\u8981\u548c ReferenceQueue \u5f15\u7528\u961f\u5217\u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public <strong>class<\/strong> <strong>PhantomReference&lt;T&gt;<\/strong> <strong>extends<\/strong> <strong>Reference&lt;T&gt;<\/strong> {\n    \/**\n     * Returns this reference object's referent.  Because the referent of a\n     * phantom reference is always inaccessible, this method always returns\n     * &lt;code&gt;null&lt;\/code&gt;.\n     *\n     * @return  &lt;code&gt;null&lt;\/code&gt;\n     *\/\n    public T get() {\n        <strong>return<\/strong> null;\n    }\n    public PhantomReference(T referent, ReferenceQueue&lt;? <strong>super<\/strong> T&gt; q) {\n        <strong>super<\/strong>(referent, q);\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>\u90a3\u4e48\u4f20\u5165\u5b83\u7684\u6784\u9020\u65b9\u6cd5\u4e2d\u7684 ReferenceQueue \u53c8\u662f\u5982\u4f55\u4f7f\u7528\u7684\u5462\uff1f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4e94\u5f15\u7528\u961f\u5217referencequeue\">\u4e94\uff0c\u5f15\u7528\u961f\u5217\uff08ReferenceQueue\uff09<\/h2>\n\n\n\n<p>\u5f15\u7528\u961f\u5217\u53ef\u4ee5\u4e0e\u8f6f\u5f15\u7528\u3001\u5f31\u5f15\u7528\u4ee5\u53ca\u865a\u5f15\u7528\u4e00\u8d77\u914d\u5408\u4f7f\u7528\uff0c\u5f53\u5783\u573e\u56de\u6536\u5668\u51c6\u5907\u56de\u6536\u4e00\u4e2a\u5bf9\u8c61\u65f6\uff0c\u5982\u679c\u53d1\u73b0\u5b83\u8fd8\u6709\u5f15\u7528\uff0c\u90a3\u4e48\u5c31\u4f1a\u5728\u56de\u6536\u5bf9\u8c61\u4e4b\u524d\uff0c\u628a\u8fd9\u4e2a\u5f15\u7528\u52a0\u5165\u5230\u4e0e\u4e4b\u5173\u8054\u7684\u5f15\u7528\u961f\u5217\u4e2d\u53bb\u3002\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7\u5224\u65ad\u5f15\u7528\u961f\u5217\u4e2d\u662f\u5426\u5df2\u7ecf\u52a0\u5165\u4e86\u5f15\u7528\uff0c\u6765\u5224\u65ad\u88ab\u5f15\u7528\u7684\u5bf9\u8c61\u662f\u5426\u5c06\u8981\u88ab\u5783\u573e\u56de\u6536\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5728\u5bf9\u8c61\u88ab\u56de\u6536\u4e4b\u524d\u91c7\u53d6\u4e00\u4e9b\u5fc5\u8981\u7684\u63aa\u65bd\u3002<\/p>\n\n\n\n<p>\u4e0e\u8f6f\u5f15\u7528\u3001\u5f31\u5f15\u7528\u4e0d\u540c\uff0c\u865a\u5f15\u7528\u5fc5\u987b\u548c\u5f15\u7528\u961f\u5217\u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u539f\u6587<\/p>\n\n\n\n<p><a href=\"https:\/\/www.cnblogs.com\/liyutian\/p\/9690974.html\">Java\u56db\u79cd\u5f15\u7528\u7c7b\u578b &#8211; Helldorado &#8211; \u535a\u5ba2\u56ed (cnblogs.com)<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-4-1024x411.png\" alt=\"\" class=\"wp-image-1825\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-4-1024x411.png 1024w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-4-300x120.png 300w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-4-768x308.png 768w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-4-1200x481.png 1200w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-4.png 1346w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u8f6f\u5f15\u7528\u573a\u666f<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"379\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-5.png\" alt=\"\" class=\"wp-image-1827\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-5.png 732w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-5-300x155.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><figcaption>\u5f31\u5f15\u7528\u7684\u4f8b\u5b50\uff0c\u6ce8\u610finterger\u7684\u7f13\u5b58\uff0ckey\u56de\u6536\u4e4b\u540e\uff0cmap\u7684\u5bf9\u8c61\u5c31\u79fb\u9664\u4e86<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"430\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-6-1024x430.png\" alt=\"\" class=\"wp-image-1831\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-6-1024x430.png 1024w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-6-300x126.png 300w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-6-768x323.png 768w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-6-1200x504.png 1200w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2022\/02\/image-6.png 1292w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u865a\u5f15\u7528<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56db\u79cd\u5f15\u7528\u7c7b\u578b \u6240\u4ee5\u5728 JDK.1.2 \u4e4b\u540e\uff0cJava \u5bf9\u5f15\u7528\u7684\u6982\u5ff5\u8fdb\u884c\u4e86\u6269\u5145\uff0c\u5c06\u5f15\u7528\u5206\u4e3a\u4e86\uff1a\u5f3a\u5f15\u7528\uff08Stron [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1819"}],"collection":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1819"}],"version-history":[{"count":9,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1819\/revisions"}],"predecessor-version":[{"id":1835,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1819\/revisions\/1835"}],"wp:attachment":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}