{"id":21047,"date":"2024-11-19T11:21:10","date_gmt":"2024-11-19T03:21:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21047\/"},"modified":"2024-11-19T11:21:10","modified_gmt":"2024-11-19T03:21:10","slug":"webstorm%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cjava%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21047\/","title":{"rendered":"webstorm\u5982\u4f55\u8fd0\u884cjava\u4ee3\u7801"},"content":{"rendered":"<p><strong>\u5982\u4f55\u5728  \u4e2d\u8fd0\u884c java \u4ee3\u7801<\/strong><\/p>\n<p>WebStorm \u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684 Java \u5f00\u53d1\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u8f7b\u677e\u5730\u8fd0\u884c Java \u4ee3\u7801\u3002\u4ee5\u4e0b\u6b65\u9aa4\u6f14\u793a\u5982\u4f55\u5728 WebStorm \u4e2d\u8fd0\u884c Java \u4ee3\u7801\uff1a<\/p>\n<p><strong>1. \u521b\u5efa Java \u9879\u76ee<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Java \u9879\u76ee\u3002\u5355\u51fb WebStorm \u4e3b\u83dc\u5355\u680f\u4e0a\u7684 &#8220;\u6587\u4ef6&#8221; &gt; &#8220;\u65b0\u5efa\u9879\u76ee&#8221;\u3002\u5728 &#8220;\u65b0\u5efa\u9879\u76ee&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9 &#8220;Java&#8221; \u4f5c\u4e3a\u8bed\u8a00\uff0c\u7136\u540e\u5355\u51fb &#8220;\u4e0b\u4e00\u6b65&#8221;\u3002<\/p>\n<p><strong>2. \u521b\u5efa Java \u7c7b<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u5728\u9879\u76ee\u4e2d\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Java \u7c7b\u3002\u53f3\u952e\u5355\u51fb\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u7136\u540e\u9009\u62e9 &#8220;\u65b0\u5efa&#8221; &gt; &#8220;Java \u7c7b&#8221;\u3002\u4e3a\u7c7b\u547d\u540d\u5e76\u9009\u62e9\u9002\u5f53\u7684\u5305\u3002<\/p>\n<p><strong>3. \u7f16\u5199 Java \u4ee3\u7801<\/strong><\/p>\n<p>\u5728 Java \u7c7b\u4e2d\uff0c\u7f16\u5199\u8981\u8fd0\u884c\u7684 Java \u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;HelloWorld.java&#8221; \u7684\u7c7b\uff0c\u5176\u4e2d\u5305\u542b\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>public class HelloWorld {\n    public static void main(String[] args) {\n        System.out.println(\"Hello, world!\");\n    }\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>4. \u521b\u5efa\u8fd0\u884c\u914d\u7f6e<\/strong><\/p>\n<p>\u5728 WebStorm \u4e2d\uff0c\u8fd0\u884c\u914d\u7f6e\u5141\u8bb8\u60a8\u6307\u5b9a\u5982\u4f55\u8fd0\u884c\u60a8\u7684 Java \u4ee3\u7801\u3002\u53f3\u952e\u5355\u51fb\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u7136\u540e\u9009\u62e9 &#8220;\u8fd0\u884c&#8221; &gt; &#8220;\u7f16\u8f91\u8fd0\u884c\u914d\u7f6e&#8221;\u3002<\/p>\n<p><strong>5. \u914d\u7f6e\u8fd0\u884c\u914d\u7f6e<\/strong><\/p>\n<p>\u5728 &#8220;\u8fd0\u884c\u914d\u7f6e&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9 &#8220;Java \u5e94\u7528\u7a0b\u5e8f&#8221; \u4f5c\u4e3a\u7c7b\u578b\u3002\u5728 &#8220;\u4e3b\u7c7b&#8221; \u5b57\u6bb5\u4e2d\uff0c\u8f93\u5165\u60a8\u8981\u8fd0\u884c\u7684 Java \u7c7b\u7684\u5b8c\u5168\u9650\u5b9a\u540d\u79f0\uff08\u4f8b\u5982\uff0c&#8221;HelloWorld&#8221;\uff09\u3002<\/p>\n<p><strong>6. \u8fd0\u884c Java \u4ee3\u7801<\/strong><\/p>\n<p>\u914d\u7f6e\u8fd0\u884c\u914d\u7f6e\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5355\u51fb WebStorm \u5de5\u5177\u680f\u4e0a\u7684 &#8220;\u8fd0\u884c&#8221; \u6309\u94ae\u6765\u8fd0\u884c\u60a8\u7684 Java \u4ee3\u7801\u3002\u6216\u8005\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u952e &#8220;Ctrl + Shift + F10&#8221; (Windows) \u6216 &#8220;Cmd + Shift + F10&#8221; (macOS)\u3002<\/p>\n<p><strong>7. \u67e5\u770b\u8fd0\u884c\u8f93\u51fa<\/strong><\/p>\n<p>\u8fd0\u884c Java \u4ee3\u7801\u540e\uff0c\u8fd0\u884c\u8f93\u51fa\u5c06\u663e\u793a\u5728 WebStorm \u7684 &#8220;\u8fd0\u884c&#8221; \u5de5\u5177\u7a97\u53e3\u4e2d\u3002\u60a8\u53ef\u4ee5\u67e5\u770b\u8f93\u51fa\u4ee5\u9a8c\u8bc1\u60a8\u7684\u4ee3\u7801\u662f\u5426\u6309\u9884\u671f\u5de5\u4f5c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8fd0\u884cjava\u4ee3\u7801\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728 \u4e2d\u8fd0\u884c java \u4ee3\u7801 WebStorm \u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684 Java \u5f00\u53d1\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u8f7b\u677e\u5730\u8fd0\u884c Java \u4ee3\u7801\u3002\u4ee5\u4e0b\u6b65\u9aa4\u6f14\u793a\u5982\u4f55\u5728 WebStorm \u4e2d\u8fd0\u884c Java \u4ee3\u7801\uff1a 1. \u521b\u5efa Java \u9879\u76ee \u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Java \u9879\u76ee\u3002\u5355\u51fb WebStorm \u4e3b\u83dc\u5355\u680f\u4e0a\u7684 &#8220;\u6587\u4ef6&#8221; &gt; &#8220;\u65b0\u5efa\u9879\u76ee&#8221;\u3002\u5728 &#8220;\u65b0\u5efa\u9879\u76ee&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9 &#8220;Java&#8221; \u4f5c\u4e3a\u8bed\u8a00\uff0c\u7136\u540e\u5355\u51fb &#8220;\u4e0b\u4e00\u6b65&#8221;\u3002 2. \u521b\u5efa Java \u7c7b \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5728\u9879\u76ee\u4e2d\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Java \u7c7b\u3002\u53f3\u952e\u5355\u51fb\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u7136\u540e\u9009\u62e9 &#8220;\u65b0\u5efa&#8221; &gt; &#8220;Java \u7c7b&#8221;\u3002\u4e3a\u7c7b\u547d\u540d\u5e76\u9009\u62e9\u9002\u5f53\u7684\u5305\u3002 3. \u7f16\u5199 Java \u4ee3\u7801 \u5728 Java \u7c7b\u4e2d\uff0c\u7f16\u5199\u8981\u8fd0\u884c\u7684 Java \u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;HelloWorld.java&#8221; \u7684\u7c7b\uff0c\u5176\u4e2d\u5305\u542b\u4ee5\u4e0b\u4ee3\u7801\uff1a public [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-21047","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=21047"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21047\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}