{"id":137,"date":"2024-11-14T19:51:45","date_gmt":"2024-11-14T11:51:45","guid":{"rendered":"https:\/\/www.armbian.net\/?p=137"},"modified":"2025-05-02T15:56:07","modified_gmt":"2025-05-02T07:56:07","slug":"java","status":"publish","type":"post","link":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/","title":{"rendered":"java"},"content":{"rendered":"\r\n<p>\u7ec8\u7aef\u8f93\u5165\uff1ajava -version<\/p>\r\n\r\n\r\n\r\n<p>\u5982\u679c\u663e\u793a\u5982\u4e0b\u7248\u672c\u4fe1\u606f\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7cfb\u7edf\u7684JDK\uff0c\u4e0d\u9700\u8981\u81ea\u5df1\u5b89\u88c5\u4e86<\/p>\r\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">[root@master100 ~]# java -version \r\njava version \"1.8.0_181\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_181-b13) Jav\r\n<\/code><\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<p>\u5982\u679c\u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\u5c31\u662f\u6ca1\u6709\u5b89\u88c5java<\/p>\r\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">Command 'java' not found, but can be installed with:\r\napt install openjdk-17-jre-headless # version 17.0.12+7-1ubuntu2~24.04, or \r\napt install openjdk-21-jre-headless # version 21.0.4+7-1ubuntu2~24.04 \r\napt install default-jre # version 2:1.17-75 \r\napt install openjdk-11-jre-headless # version 11.0.24+8-1ubuntu3~24.04.1 \r\napt install openjdk-8-jre-headless # version 8u422-b05-1~24.04 \r\napt install openjdk-19-jre-headless # version 19.0.2+7-4 \r\napt install openjdk-20-jre-headless # version 20.0.2+9-1 \r\napt install openjdk-22-jre-headless # version 22~22ea-1\r\n<\/code><\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p>\u8f93\u5165\u81ea\u5df1\u9700\u8981\u5b89\u88c5\u7684java\u7248\u672c\u8fdb\u884c\u5b89\u88c5\u5373\u53ef\uff0c\u5982\uff1a<\/p>\r\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">apt install openjdk-8-jre-headlessr<\/code><\/pre>\r\n\r\n\r\n\r\n\r\n\r\n<p><strong>\u5982\u679c\u9700\u8981\u5b89\u88c5\u522b\u7684\u7248\u672c\u7684java\u600e\u4e48\u5b89\u88c5\uff1f<\/strong><\/p>\r\n<p>\u6bd4\u5982\u9700\u8981\u5b89\u88c5java 17\u7248\u672c\uff0c\u90a3\u4e48\u5c31\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4<\/p>\r\n<pre class=\"code\"> sudo apt install openjdk-17-jdk<\/pre>\r\n","protected":false},"excerpt":{"rendered":"<p>\u7ec8\u7aef\u8f93\u5165\uff1ajava -version \u5982\u679c\u663e\u793a\u5982\u4e0b\u7248\u672c\u4fe1\u606f\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7cfb\u7edf\u7684JDK\uff0c\u4e0d\u9700\u8981\u81ea\u5df1\u5b89 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>java - armbian\u670d\u52a1\u5668\u7cfb\u7edf<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"java - armbian\u670d\u52a1\u5668\u7cfb\u7edf\" \/>\n<meta property=\"og:description\" content=\"\u7ec8\u7aef\u8f93\u5165\uff1ajava -version \u5982\u679c\u663e\u793a\u5982\u4e0b\u7248\u672c\u4fe1\u606f\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7cfb\u7edf\u7684JDK\uff0c\u4e0d\u9700\u8981\u81ea\u5df1\u5b89 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\" \/>\n<meta property=\"og:site_name\" content=\"armbian\u670d\u52a1\u5668\u7cfb\u7edf\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-14T11:51:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-02T07:56:07+00:00\" \/>\n<meta name=\"author\" content=\"2668171712\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"2668171712\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\"},\"author\":{\"name\":\"2668171712\",\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"headline\":\"java\",\"datePublished\":\"2024-11-14T11:51:45+00:00\",\"dateModified\":\"2025-05-02T07:56:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\"},\"wordCount\":12,\"publisher\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"articleSection\":[\"\u7f16\u7a0b\u8bed\u8a00\u73af\u5883\u5b89\u88c5\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\",\"url\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\",\"name\":\"java - armbian\u670d\u52a1\u5668\u7cfb\u7edf\",\"isPartOf\":{\"@id\":\"https:\/\/www.armbian.net\/#website\"},\"datePublished\":\"2024-11-14T11:51:45+00:00\",\"dateModified\":\"2025-05-02T07:56:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.armbian.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.armbian.net\/#website\",\"url\":\"https:\/\/www.armbian.net\/\",\"name\":\"armbian\u670d\u52a1\u5668\u7cfb\u7edf\",\"description\":\"armbian \u8ba9\u4e07\u7269\u91cd\u65b0\u91ca\u653e\u4ef7\u503c\uff0c\u4e3a\u4e86\u65e0\u6cd5\u66ff\u4ee3\u7684\u4ef7\u503c\",\"publisher\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.armbian.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\",\"name\":\"2668171712\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png\",\"contentUrl\":\"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png\",\"width\":512,\"height\":512,\"caption\":\"2668171712\"},\"logo\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.armbian.net\"],\"url\":\"https:\/\/www.armbian.net\/index.php\/author\/2668171712\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"java - armbian\u670d\u52a1\u5668\u7cfb\u7edf","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/","og_locale":"zh_CN","og_type":"article","og_title":"java - armbian\u670d\u52a1\u5668\u7cfb\u7edf","og_description":"\u7ec8\u7aef\u8f93\u5165\uff1ajava -version \u5982\u679c\u663e\u793a\u5982\u4e0b\u7248\u672c\u4fe1\u606f\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7cfb\u7edf\u7684JDK\uff0c\u4e0d\u9700\u8981\u81ea\u5df1\u5b89 [&hellip;]","og_url":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/","og_site_name":"armbian\u670d\u52a1\u5668\u7cfb\u7edf","article_published_time":"2024-11-14T11:51:45+00:00","article_modified_time":"2025-05-02T07:56:07+00:00","author":"2668171712","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"2668171712","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/#article","isPartOf":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/"},"author":{"name":"2668171712","@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"headline":"java","datePublished":"2024-11-14T11:51:45+00:00","dateModified":"2025-05-02T07:56:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/"},"wordCount":12,"publisher":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"articleSection":["\u7f16\u7a0b\u8bed\u8a00\u73af\u5883\u5b89\u88c5"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/","url":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/","name":"java - armbian\u670d\u52a1\u5668\u7cfb\u7edf","isPartOf":{"@id":"https:\/\/www.armbian.net\/#website"},"datePublished":"2024-11-14T11:51:45+00:00","dateModified":"2025-05-02T07:56:07+00:00","breadcrumb":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.armbian.net\/"},{"@type":"ListItem","position":2,"name":"java"}]},{"@type":"WebSite","@id":"https:\/\/www.armbian.net\/#website","url":"https:\/\/www.armbian.net\/","name":"armbian\u670d\u52a1\u5668\u7cfb\u7edf","description":"armbian \u8ba9\u4e07\u7269\u91cd\u65b0\u91ca\u653e\u4ef7\u503c\uff0c\u4e3a\u4e86\u65e0\u6cd5\u66ff\u4ee3\u7684\u4ef7\u503c","publisher":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.armbian.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542","name":"2668171712","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.armbian.net\/#\/schema\/person\/image\/","url":"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png","contentUrl":"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png","width":512,"height":512,"caption":"2668171712"},"logo":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.armbian.net"],"url":"https:\/\/www.armbian.net\/index.php\/author\/2668171712\/"}]}},"views":1609,"_links":{"self":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":5,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":390,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/137\/revisions\/390"}],"wp:attachment":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}