Skip to content

Commit

Permalink
New translations java.mdx (Spanish (Modern))
Browse files Browse the repository at this point in the history
  • Loading branch information
ukdaaan committed Dec 2, 2023
1 parent 6a6c935 commit 6bf9921
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions folder/es/src/content/docs/troubleshooting/java.mdx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
description: Understand and troubleshoot some of the most common issues with Java when setting up your Minecraft server.
slug: ts/java
title: Java
---

Sometimes you can have issues at the first hurdle, getting your server to boot. Some of these issues are to do with your Java deployment and we will cover some quick fixes to get you up and running.

### Missing PATH variable

Depending on the OS you're running there are multiple ways to set the ENV / PATH location to call upon the java executable.

#### Windows

If you're on windows this can be done entirely via the UI however some steps maybe slightly different depending on your Windows release. Below are steps based on Windows 11.

<ul class="pl-5 list-disc">
<li>Navigate to `c:\program files\java` and identify the JDK version folder name e.g. `jdk-19`</li>
<li>Open the bin folder within the JDK folder and copy the full folder path from file explorer</li>
<li>Select the Windows icon open the start menu and go to 'Settings'</li>
<li>Select the 'System' tab on the left hand side and go to the 'About' menu</li>
<li>Open 'Advanced System Settings'</li>
<li>Select the 'Advanced' tab</li>
<li>Select 'Environment Variables'</li>
<li>Under 'System Variables' scroll down until you see 'Path'</li>
<li>Select 'Edit'</li>
<li>Now select 'New' and paste in the file explorer path you copied earlier</li>
<li>Press 'OK' to save changes</li>
</ul>

You can verify the above steps have worked as expected by running the following command in a command prompt window.

`java --version` or `javac`

#### MacOS

If you're running MacOS there's two different commands you could possibly run, the first (bash) is more for older devices and the latter (zsh) is for anything running Catalina or newer.

##### Bash Command

```bash
...

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.bash_profile
exec bash -l

...
```

##### ZSH Command

```bash
...

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.zshrc
exec zsh -l

...
```

* * *

### Memory allocation

* * *

### Wrong version of Java installed

When it comes to the 'wrong version installed' there's a few factors to consider.

<ul class="pl-5 list-disc">
<li>Bit edition (x86 or x64 or ARM etc)</li>
<li>Major LTS revision</li>
</ul>

You can identify if you're having issues due to the bit version by lowering the start-up args from a value greater than `4` for -Xms and -Xmx. If your server boots without issues to the `Done in X seconds` line you will need to uninstall your java release and download the 64 bit edition as this doesn't have the 4GB RAM memory limitation.

If your server still doesn't boot after decreasing the RAM it's most likely that your machine has the wrong edition of Java installed, certain major releases of Java dropped legacy builds as time has gone on.

The most commonly adopted Java releases are as follows:

<ul class="pl-5 list-disc">
<li>Java 8 (LTS)</li>
<li>Java 11 (LTS)</li>
<li>Java 17 (LTS)</li>
<li>Java 19 (LTS)</li>
</ul>

0 comments on commit 6bf9921

Please sign in to comment.