{"id":475881,"date":"2023-08-09T07:24:43","date_gmt":"2023-08-09T07:24:43","guid":{"rendered":""},"modified":"2023-09-05T11:11:30","modified_gmt":"2023-09-05T11:11:30","slug":"applet","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/cn\/wiki\/applet\/","title":{"rendered":"\u5c0f\u7a0b\u5e8f"},"content":{"rendered":"<p>Applet \u662f\u4e00\u79cd\u8f6f\u4ef6\uff0c\u65e8\u5728\u5728\u5927\u578b\u7a0b\u5e8f\uff08\u901a\u5e38\u662f Web \u6d4f\u89c8\u5668\uff09\u7684\u4e0a\u4e0b\u6587\u4e2d\u6267\u884c\uff0c\u63d0\u4f9b\u6838\u5fc3\u7a0b\u5e8f\u672c\u8eab\u4e0d\u63d0\u4f9b\u7684\u4e30\u5bcc\u4ea4\u4e92\u529f\u80fd\u3002Applet \u7528 Java \u7f16\u7a0b\u8bed\u8a00\u7f16\u5199\uff0c\u4e3b\u8981\u7528\u4e8e\u7f51\u7edc\u8ba1\u7b97\u3002\u5b83\u4eec\u53ef\u4ee5\u54cd\u5e94\u7528\u6237\u8f93\u5165\uff0c\u4f8b\u5982\u9f20\u6807\u70b9\u51fb\u6216\u952e\u76d8\u8f93\u5165\uff0c\u8fd8\u53ef\u4ee5\u4e0e\u540c\u4e00\u7f51\u9875\u4e0a\u7684\u5176\u4ed6 Applet \u4ea4\u4e92\u3002<\/p>\n<h2>Applet\u7684\u5386\u53f2\u80cc\u666f<\/h2>\n<p>\u5c0f\u7a0b\u5e8f\u7684\u5386\u53f2\u53ef\u4ee5\u8ffd\u6eaf\u5230 20 \u4e16\u7eaa 90 \u5e74\u4ee3\u4e2d\u671f\uff0c\u5f53\u65f6 Java \u7f16\u7a0b\u8bed\u8a00\u9996\u6b21\u7531 Sun Microsystems \u5f00\u53d1\u3002\u201c\u5c0f\u7a0b\u5e8f\u201d\u4e00\u8bcd\u9996\u6b21\u4f7f\u7528\u662f\u5728 1995 \u5e74\uff0c\u5f53\u65f6 Java \u4f5c\u4e3a\u4e00\u79cd\u4e13\u4e3a\u4e92\u8054\u7f51\u8bbe\u8ba1\u7684\u65b0\u7f16\u7a0b\u8bed\u8a00\u88ab\u5f15\u5165\u4e16\u754c\u3002\u5176\u6982\u5ff5\u662f\u63d0\u4f9b\u4e00\u4e2a\u53ef\u4ee5\u5d4c\u5165 HTML \u9875\u9762\u5e76\u5728 Web \u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\u7684\u5c0f\u578b\u5e94\u7528\u7a0b\u5e8f\uff08\u56e0\u6b64\u79f0\u4e3a\u201c\u5c0f\u7a0b\u5e8f\u201d\uff09\u3002<\/p>\n<h2>\u6269\u5c55\u5c0f\u7a0b\u5e8f<\/h2>\n<p>\u5982\u4e0a\u6240\u8ff0\uff0cApplet \u662f\u5c0f\u578b Java \u7a0b\u5e8f\uff0c\u53ef\u4ee5\u96c6\u6210\u5230 HTML \u9875\u9762\u4e2d\uff0c\u5728\u5ba2\u6237\u7aef\u8fd0\u884c\uff0c\u5e76\u7531 Java \u865a\u62df\u673a (JVM) \u6267\u884c\u3002\u5c0f\u7a0b\u5e8f\u53ef\u4ee5\u5728\u4efb\u4f55\u652f\u6301 JVM \u7684 Web \u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\u3002\u5b83\u4eec\u7528\u4e8e\u4f7f\u7f51\u9875\u66f4\u52a0\u52a8\u6001\u548c\u6709\u8da3\u3002\u4f8b\u5982\uff0c\u5b83\u4eec\u53ef\u4ee5\u663e\u793a\u4ea4\u4e92\u5f0f\u56fe\u5f62\uff0c\u6216\u6839\u636e\u7528\u6237\u8f93\u5165\u6267\u884c\u8ba1\u7b97\u3002<\/p>\n<p>Applet \u7684\u751f\u547d\u5468\u671f\u7531\u6d4f\u89c8\u5668\u548c JVM \u63a7\u5236\u3002\u751f\u547d\u5468\u671f\u5305\u62ec\u56db\u4e2a\u9636\u6bb5\uff1a\u521d\u59cb\u5316\u3001\u542f\u52a8\u3001\u505c\u6b62\u548c\u9500\u6bc1\u3002\u5f53 JVM \u52a0\u8f7d\u5e76\u5b9e\u4f8b\u5316\u5c0f\u7a0b\u5e8f\u65f6\uff0c\u5b83\u7684\u751f\u547d\u5c31\u5f00\u59cb\u4e86\u3002\u7136\u540e\u5b83\u88ab\u521d\u59cb\u5316\u3001\u542f\u52a8\u5e76\u663e\u793a\u5728\u7f51\u9875\u4e0a\u3002\u5f53\u7528\u6237\u79bb\u5f00\u9875\u9762\u65f6\uff0c\u5c0f\u7a0b\u5e8f\u5c06\u505c\u6b62\uff0c\u7136\u540e\u88ab JVM \u9500\u6bc1\u3002<\/p>\n<h2>Applet \u7684\u5185\u90e8\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>Applet \u7531 Java \u5b57\u8282\u7801\u7ec4\u6210\uff0c\u5b83\u662f\u7a0b\u5e8f\u7684\u72ec\u7acb\u4e8e\u5e73\u53f0\u7684\u8868\u793a\u5f62\u5f0f\uff0c\u5e76\u4e14\u5728\u5b89\u88c5\u5728\u6d4f\u89c8\u5668\u4e2d\u7684 JVM \u5185\u8fd0\u884c\u3002\u5f53\u52a0\u8f7d\u5305\u542bapplet\u7684\u7f51\u9875\u65f6\uff0c\u6d4f\u89c8\u5668\u7684Java\u63d2\u4ef6\u4f1a\u4e0b\u8f7dapplet\u7684\u5b57\u8282\u7801\uff0c\u542f\u52a8JVM\uff0c\u7136\u540e\u5728JVM\u4e2d\u52a0\u8f7d\u5e76\u6267\u884capplet\u3002<\/p>\n<p>\u5c0f\u7a0b\u5e8f\u901a\u8fc7\u6587\u6863\u5bf9\u8c61\u6a21\u578b (DOM) \u4e0e\u7f51\u9875\u4ea4\u4e92\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7 HTTP \u6216\u5176\u4ed6 Internet \u534f\u8bae\u4e0e\u52a0\u8f7d\u5b83\u7684\u670d\u52a1\u5668\u8fdb\u884c\u901a\u4fe1\u3002\u7136\u800c\uff0c\u51fa\u4e8e\u5b89\u5168\u539f\u56e0\uff0c\u5b83\u901a\u5e38\u88ab\u6c99\u7bb1\u5316\u5e76\u9650\u5236\u8bbf\u95ee\u672c\u5730\u6587\u4ef6\u6216\u67d0\u4e9b\u7cfb\u7edf\u8d44\u6e90\u3002<\/p>\n<h2>\u5c0f\u7a0b\u5e8f\u7684\u4e3b\u8981\u7279\u70b9<\/h2>\n<ul>\n<li><strong>\u5e73\u53f0\u72ec\u7acb\u6027\uff1a<\/strong> Applet \u662f\u7528 Java \u7f16\u5199\u7684\uff0c\u5b83\u4e0e\u5e73\u53f0\u65e0\u5173\u3002\u5b83\u4eec\u53ef\u4ee5\u5728\u4efb\u4f55\u5177\u6709\u652f\u6301 JVM \u7684\u6d4f\u89c8\u5668\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002<\/li>\n<li><strong>\u7f51\u7edc\u8fde\u63a5\uff1a<\/strong> Applet \u53ef\u4ee5\u901a\u8fc7\u7f51\u7edc\u8fdb\u884c\u901a\u4fe1\uff0c\u4f7f\u5b83\u4eec\u6210\u4e3a\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u90e8\u5206\u3002<\/li>\n<li><strong>\u6c99\u76d2\u5b89\u5168\uff1a<\/strong> \u5b83\u4eec\u5728\u5b89\u5168\u6c99\u7bb1\u5185\u8fd0\u884c\uff0c\u4ee5\u9632\u6b62\u5bf9\u7cfb\u7edf\u8d44\u6e90\u7684\u672a\u7ecf\u6388\u6743\u7684\u8bbf\u95ee\uff0c\u4ece\u800c\u786e\u4fdd\u7528\u6237\u5b89\u5168\u3002<\/li>\n<li><strong>\u4e30\u5bcc\u7684\u7528\u6237\u754c\u9762\uff1a<\/strong> \u5c0f\u7a0b\u5e8f\u53ef\u4ee5\u521b\u5efa\u590d\u6742\u7684\u56fe\u5f62\u7528\u6237\u754c\u9762 (GUI) \u5e76\u5236\u4f5c\u6d41\u7545\u7684\u52a8\u753b\uff0c\u4f7f\u5176\u9002\u5408\u521b\u5efa\u4ea4\u4e92\u5f0f\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ul>\n<h2>\u5c0f\u7a0b\u5e8f\u7684\u7c7b\u578b<\/h2>\n<p>\u5c0f\u7a0b\u5e8f\u4e3b\u8981\u6709\u4e24\u79cd\u7c7b\u578b\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u672c\u5730\u5c0f\u7a0b\u5e8f\uff1a<\/strong> \u8fd9\u4e9b\u5c0f\u7a0b\u5e8f\u4e0b\u8f7d\u540e\u4e0d\u9700\u8981\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u3002\u5b83\u4eec\u5728\u7528\u6237\u7684\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\u5e76\u6267\u884c\u529f\u80fd\uff0c\u800c\u65e0\u9700\u8fde\u63a5\u5230\u670d\u52a1\u5668\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u8fdc\u7a0b\u5c0f\u7a0b\u5e8f\uff1a<\/strong> \u8fd9\u4e9b\u5c0f\u7a0b\u5e8f\u9700\u8981\u6301\u7eed\u7684\u4e92\u8054\u7f51\u8fde\u63a5\u3002\u5b83\u4eec\u4e0e\u670d\u52a1\u5668\u901a\u4fe1\u4ee5\u6267\u884c\u5176\u529f\u80fd\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>Applet \u7684\u4f7f\u7528\u53ca\u76f8\u5173\u95ee\u9898<\/h2>\n<p>\u5c0f\u7a0b\u5e8f\u901a\u5e38\u7528\u4e8e\u5728\u7f51\u9875\u4e0a\u63d0\u4f9b\u4ea4\u4e92\u529f\u80fd\uff0c\u4f8b\u5982\u6e38\u620f\u3001\u8ba1\u7b97\u5668\u3001\u52a8\u753b\u548c\u4ea4\u4e92\u5f0f\u5730\u56fe\u3002\u5b83\u4eec\u8fd8\u53ef\u4ee5\u7528\u4e8e\u66f4\u590d\u6742\u7684\u4efb\u52a1\uff0c\u4f8b\u5982\u5728\u7ebf\u6295\u7968\u3001\u7535\u5b50\u5546\u52a1\u548c\u8fdc\u7a0b\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u7136\u800c\uff0c\u7531\u4e8e\u4ee5\u4e0b\u51e0\u4e2a\u95ee\u9898\uff0c\u5c0f\u7a0b\u5e8f\u7684\u4f7f\u7528\u591a\u5e74\u6765\u4e00\u76f4\u5728\u4e0b\u964d\uff1a<\/p>\n<ul>\n<li><strong>\u5b89\u5168\u95ee\u9898\uff1a<\/strong> \u5c3d\u7ba1\u5c0f\u7a0b\u5e8f\u5728\u6c99\u7bb1\u4e2d\u8fd0\u884c\uff0c\u4f46\u8fc7\u53bb\u66fe\u88ab\u7528\u4e8e\u6076\u610f\u76ee\u7684\uff0c\u8fd9\u4f7f\u8bb8\u591a\u7528\u6237\u548c\u7ec4\u7ec7\u5bf9\u5b83\u4eec\u4fdd\u6301\u8b66\u60d5\u3002<\/li>\n<li><strong>\u8868\u73b0\uff1a<\/strong> \u7531\u4e8e\u5c0f\u7a0b\u5e8f\u5728\u5ba2\u6237\u7aef\u8fd0\u884c\uff0c\u56e0\u6b64\u5176\u52a0\u8f7d\u901f\u5ea6\u53ef\u80fd\u5f88\u6162\u5e76\u4e14\u4f1a\u6d88\u8017\u5927\u91cf\u7cfb\u7edf\u8d44\u6e90\u3002<\/li>\n<li><strong>\u5bf9Java\u7684\u4f9d\u8d56\uff1a<\/strong> \u7528\u6237\u5fc5\u987b\u5728\u6d4f\u89c8\u5668\u4e2d\u5b89\u88c5\u5e76\u6b63\u786e\u914d\u7f6e Java \u8fd0\u884c\u65f6\u73af\u5883 (JRE)\uff0c\u8fd9\u5bf9\u4e8e\u975e\u6280\u672f\u7528\u6237\u6765\u8bf4\u53ef\u80fd\u662f\u4e00\u9879\u590d\u6742\u7684\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<h2>\u5c0f\u7a0b\u5e8f\u4e0e\u7c7b\u4f3c\u672f\u8bed\u7684\u6bd4\u8f83<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5177\u6709\u7c7b\u4f3c\u6982\u5ff5\u7684\u5c0f\u7a0b\u5e8f\u7684\u6bd4\u8f83\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5b66\u671f<\/th>\n<th>\u5b9a\u4e49<\/th>\n<th>\u6267\u884c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u5c0f\u7a0b\u5e8f<\/td>\n<td>\u5d4c\u5165 HTML \u9875\u9762\u7684\u5c0f\u578b\u5e94\u7528\u7a0b\u5e8f\uff0c\u7531 JVM \u5728 Web \u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c<\/td>\n<td>\u5ba2\u6237\u7aef<\/td>\n<\/tr>\n<tr>\n<td>\u670d\u52a1\u7a0b\u5e8f<\/td>\n<td>\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u7684 Java \u7a0b\u5e8f\uff0c\u901a\u5e38\u7528\u4e8e\u751f\u6210\u52a8\u6001 Web \u5185\u5bb9<\/td>\n<td>\u670d\u52a1\u5668\u7aef<\/td>\n<\/tr>\n<tr>\n<td>JavaScript<\/td>\n<td>\u4e00\u79cd\u7f51\u9875\u811a\u672c\u8bed\u8a00\uff0c\u7531\u6d4f\u89c8\u5668\u7684 JavaScript \u5f15\u64ce\u8fd0\u884c<\/td>\n<td>\u5ba2\u6237\u7aef<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Applet\u76f8\u5173\u7684\u672a\u6765\u5c55\u671b\u548c\u6280\u672f<\/h2>\n<p>\u7531\u4e8e HTML5\u3001CSS3 \u548c JavaScript \u7b49\u73b0\u4ee3 Web \u6280\u672f\u7684\u5174\u8d77\uff0cApplet \u7684\u672a\u6765\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u8fd9\u4e9b\u6280\u672f\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u800c\u4e0d\u9700\u8981\u7528\u6237\u5b89\u88c5 JVM \u6216\u5904\u7406 Java \u7684\u5b89\u5168\u95ee\u9898\u3002<\/p>\n<p>\u7136\u800c\uff0cApplet \u4ecd\u7136\u5728\u67d0\u4e9b\u9886\u57df\u5360\u636e\u4e0a\u98ce\uff0c\u4f8b\u5982\u9700\u8981 Java \u5168\u90e8\u529f\u80fd\u7684\u590d\u6742\u5e94\u7528\u7a0b\u5e8f\u3002\u6b64\u5916\uff0cJava Web Start\u6280\u672f\u5141\u8bb8\u76f4\u63a5\u4eceWeb\u6d4f\u89c8\u5668\u542f\u52a8\u5168\u529f\u80fdJava\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5e26\u6765\u7c7b\u4f3capplet\u7684\u529f\u80fd\u7684\u590d\u5174\u3002<\/p>\n<h2>\u5c0f\u7a0b\u5e8f\u548c\u4ee3\u7406\u670d\u52a1\u5668<\/h2>\n<p>\u867d\u7136\u5c0f\u7a0b\u5e8f\u548c\u4ee3\u7406\u670d\u52a1\u5668\u662f\u4e0d\u540c\u7684\u6280\u672f\uff0c\u4f46\u5b83\u4eec\u53ef\u4ee5\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u8fdb\u884c\u4ea4\u4e92\u3002\u4ee3\u7406\u670d\u52a1\u5668\u53ef\u4ee5\u8c03\u89e3 applet \u4e0e\u5176\u901a\u4fe1\u7684\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u63d0\u4f9b\u7f13\u5b58\u3001\u8fc7\u6ee4\u548c\u589e\u5f3a\u5b89\u5168\u6027\u7b49\u4f18\u52bf\u3002\u4f46\u662f\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5c0f\u7a0b\u5e8f\u5fc5\u987b\u8bbe\u8ba1\u4e3a\u652f\u6301\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u5e76\u4e14\u7528\u6237\u7684\u6d4f\u89c8\u5668\u5fc5\u987b\u914d\u7f6e\u4e3a\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u3002<\/p>\n<h2>\u76f8\u5173\u94fe\u63a5<\/h2>\n<p>\u6709\u5173 Applet \u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8003\u8651\u4ee5\u4e0b\u8d44\u6e90\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/deployment\/applet\/index.html\" target=\"_new\" rel=\"noopener nofollow\">Java \u5c0f\u7a0b\u5e8f\uff08Oracle \u6587\u6863\uff09<\/a><\/li>\n<li><a href=\"https:\/\/www.geeksforgeeks.org\/java-applets-basics\" target=\"_new\" rel=\"noopener nofollow\">Java\uff1aApplet \u57fa\u7840\u77e5\u8bc6 (GeeksforGeeks)<\/a><\/li>\n<li><a href=\"https:\/\/www.tutorialspoint.com\/java\/java_appletbasics.htm\" target=\"_new\" rel=\"noopener nofollow\">Java Applet \u7b80\u4ecb\uff08Tutorialspoint\uff09<\/a><\/li>\n<\/ul>","protected":false},"featured_media":467622,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-475881","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Applet: An Overview<\/mark>","faq_items":[{"question":"What is an Applet?","answer":"<p>An Applet is a small software application written in Java, designed to run within the context of a larger program, often a web browser. It provides rich, interactive features that the main program does not offer.<\/p>"},{"question":"When was the term \"Applet\" first used?","answer":"<p>The term \"Applet\" was first used in 1995, when Java was introduced to the world as a new programming language designed specifically for the internet.<\/p>"},{"question":"How does an Applet work?","answer":"<p>An Applet consists of Java bytecode that runs inside a Java Virtual Machine (JVM) installed in the browser. When a webpage containing an applet is loaded, the browser's Java plugin downloads the applet's bytecode, starts a JVM, and then loads and executes the applet within the JVM.<\/p>"},{"question":"What are the key features of an Applet?","answer":"<p>The key features of an Applet include platform independence, network connectivity, sandboxed security, and the ability to create rich user interfaces.<\/p>"},{"question":"What types of Applets exist?","answer":"<p>There are primarily two types of Applets: Local Applets, which run within the user's browser and perform functions without needing to connect to a server; and Remote Applets, which require constant internet connectivity and communicate with a server to perform their functions.<\/p>"},{"question":"What are the problems associated with the use of Applets?","answer":"<p>Some of the problems associated with the use of Applets include security issues, performance limitations, and a dependence on Java.<\/p>"},{"question":"How does an Applet compare with similar terms like Servlet and JavaScript?","answer":"<p>While an Applet is a small application that is embedded within an HTML page and run by a JVM in a web browser, a Servlet is a Java program that runs on a server, typically used to generate dynamic web content. On the other hand, JavaScript is a scripting language for web pages, run by the browser's JavaScript engine.<\/p>"},{"question":"What are the future perspectives and technologies related to Applet?","answer":"<p>The future of Applets is uncertain due to the rise of modern web technologies such as HTML5, CSS3, and JavaScript, which provide similar functionality without requiring users to install a JVM or deal with Java's security issues. However, areas requiring the full power of Java still prefer Applets.<\/p>"},{"question":"How can proxy servers be used or associated with Applets?","answer":"<p>A proxy server can mediate the connection between an Applet and the server it communicates with, providing benefits like caching, filtering, and enhanced security. However, it's important to note that the Applet must be designed to support proxy servers, and the user's browser must be configured to use the proxy server.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/475881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/475881\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media\/467622"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media?parent=475881"}],"curies":[{"name":"\u53ef\u6e7f\u6027\u7c89\u5242","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}