{"id":416,"date":"2024-05-11T20:01:53","date_gmt":"2024-05-11T18:01:53","guid":{"rendered":"https:\/\/binaryvikings.io\/?p=416"},"modified":"2024-05-11T20:04:07","modified_gmt":"2024-05-11T18:04:07","slug":"minecraft-server-not-launching-1-20-6","status":"publish","type":"post","link":"https:\/\/binaryvikings.io\/?p=416","title":{"rendered":"Minecraft Server not launching 1.20.6"},"content":{"rendered":"<div class=\"wp-block-table-of-contents-block-table-of-contents-block\"><div class=\"eb-parent-wrapper eb-parent-eb-toc-7tq90 \"><div class=\"eb-toc-container eb-toc-7tq90  eb-toc-is-not-sticky eb-toc-not-collapsible eb-toc-initially-not-collapsed eb-toc-scrollToTop style-1 list-style-none\" data-scroll-top=\"false\" data-scroll-top-icon=\"fas fa-angle-up\" data-collapsible=\"false\" data-sticky-hide-mobile=\"false\" data-sticky=\"false\" data-scroll-target=\"scroll_to_toc\" data-copy-link=\"false\" data-editor-type=\"\" data-hide-desktop=\"false\" data-hide-tab=\"false\" data-hide-mobile=\"false\" data-itemCollapsed=\"false\"><div class=\"eb-toc-header\"><div class=\"eb-toc-title\">Table of Contents<\/div><\/div><div class=\"eb-toc-wrapper \" data-headers=\"[{&quot;level&quot;:1,&quot;content&quot;:&quot;1. Attempts to solve&quot;,&quot;text&quot;:&quot;1. Attempts to solve&quot;,&quot;link&quot;:&quot;1-attempts-to-solve&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;1.1 Update the system&quot;,&quot;text&quot;:&quot;1.1 Update the system&quot;,&quot;link&quot;:&quot;11-update-the-system&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;1.2 Re-install openjdk-17&quot;,&quot;text&quot;:&quot;1.2 Re-install openjdk-17&quot;,&quot;link&quot;:&quot;12-re-install-openjdk-17&quot;},{&quot;level&quot;:1,&quot;content&quot;:&quot;2. Solution&quot;,&quot;text&quot;:&quot;2. Solution&quot;,&quot;link&quot;:&quot;2-solution&quot;}]\" data-visible=\"[true,true,true,true,true,true]\" data-delete-headers=\"[{&quot;label&quot;:&quot;1. Attempts to solve&quot;,&quot;value&quot;:&quot;1-attempts-to-solve&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;1.1 Update the system&quot;,&quot;value&quot;:&quot;11-update-the-system&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;1.2 Re-install openjdk-17&quot;,&quot;value&quot;:&quot;12-re-install-openjdk-17&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;2. Solution&quot;,&quot;value&quot;:&quot;2-solution&quot;,&quot;isDelete&quot;:false}]\" data-smooth=\"true\" data-top-offset=\"\"><div class=\"eb-toc__list-wrap\"><ul class='eb-toc__list'><li><a href=\"#1-attempts-to-solve\">1. Attempts to solve<\/a><ul class='eb-toc__list'><li><a href=\"#11-update-the-system\">1.1 Update the system<\/a><li><a href=\"#12-re-install-openjdk-17\">1.2 Re-install openjdk-17<\/a><\/li><\/ul><li><a href=\"#2-solution\">2. Solution<\/a><\/ul><\/div><\/div><\/div><\/div><\/div>\n\n\n<p>FYI &#8211; this Minecraft Server is running on Debian 11, Bullseye. So if the solution does not work for you, maybe try the attempts listed here.<\/p>\n\n\n\n<p>If you&#8217;re experiencing an issue when launching the Minecraft server, where it shows the following:<br><code>java -Xms1G -Xmx2560M -jar minecraft_server.1.20.6.jar nogui<br>Error: LinkageError occurred while loading main class net.minecraft.bundler.Main<br>java.lang.UnsupportedClassVersionError: net\/minecraft\/bundler\/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0<\/code><\/p>\n\n\n\n<p>&#8230; it is most likely caused by a wrong version of Java. As Minecraft Server 1.20.4 worked just fine on <strong>openjdk-17<\/strong>, I expected 1.20.6 to work as well, however, evidently not.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">1. Attempts to solve<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">1.1 Update the system<\/h2>\n\n\n\n<p>I did run the update, upgrade and removing unused packages, to make sure I didn&#8217;t miss any updates on the openjdk 17, currently installed.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt update && sudo apt upgrade\nsudo apt autoremove<\/code><\/pre><\/div>\n\n\n\n<p>However this appeared to solve nothing, though plenty of updates were available.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1.2 Re-install openjdk-17<\/h2>\n\n\n\n<p>I then attempted to re-install the openjdk-17 entirely by running the following commands:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt purge openjdk-17*\nsudo apt install openjdk-17*<\/code><\/pre><\/div>\n\n\n\n<p>Unfortunately this also did not solve my issue.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">2. Solution<\/h1>\n\n\n\n<p>The thing that solved it for me was to indeed purge openjdk-17 first, as described in step 1.2, without re-installing. However, I opted to update and install openjdk-21<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>wget https:\/\/download.oracle.com\/java\/21\/latest\/jdk-21_linux-x64_bin.deb\nsudo dpkg -i jdk-21_linux-x64_bin.deb<\/code><\/pre><\/div>\n\n\n\n<p>I then confirmed my new java version, using:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>java --version\n\njava 21.0.3 2024-04-16 LTS\nJava(TM) SE Runtime Environment (build 21.0.3+7-LTS-152)\nJava HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)<\/code><\/pre><\/div>\n\n\n\n<p>This solved my issue and my Minecraft Server came back up as soon as I ran the Minecraft Server launch command again&#8230;<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>java -Xms1G -Xmx2560M -jar minecraft_server.1.20.6.jar nogui<\/code><\/pre><\/div>\n\n\n\n<p>Good luck!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Over&#8217;n&#8217;Out,<\/p>\n\n\n\n<p>Brian<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FYI &#8211; this Minecraft Server is running on Debian 11, Bullseye. So if the solution does not work for you, maybe try the attempts listed<\/p>\n","protected":false},"author":1,"featured_media":243,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[27,12],"tags":[32,28,15,30,33,29,31],"class_list":["post-416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games","category-guides","tag-debian","tag-game","tag-guide","tag-java","tag-linux","tag-minecraft","tag-openjdk"],"_links":{"self":[{"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/posts\/416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=416"}],"version-history":[{"count":2,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions"}],"predecessor-version":[{"id":418,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions\/418"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=\/wp\/v2\/media\/243"}],"wp:attachment":[{"href":"https:\/\/binaryvikings.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binaryvikings.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}