HowToBuildStendhal: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
Build Tools: reduce indentation level & add links
imported>AntumDeluge
JDK on Windows: installing using WinGet
Line 41: Line 41:


Packages for Windows can be downloaded from either [https://www.oracle.com/java/technologies/downloads/ oracle.com] or for OpenJDK, from [https://jdk.java.net/ jdk.java.net]. If you download a portable .zip package, you will need to manually configure the PATH environment variable so the system knows where the <span style="color:darkred;">''java''</span> and <span style="color:darkred;">''javac''</span> executables are located. It may also be necessary to configure the <span style="color:darkgreen;">''JAVA_HOME''</span> environment variable. The recommended method is to use an installer package (.exe or .msi) as these will configure the necessary environment variables automatically.
Packages for Windows can be downloaded from either [https://www.oracle.com/java/technologies/downloads/ oracle.com] or for OpenJDK, from [https://jdk.java.net/ jdk.java.net]. If you download a portable .zip package, you will need to manually configure the PATH environment variable so the system knows where the <span style="color:darkred;">''java''</span> and <span style="color:darkred;">''javac''</span> executables are located. It may also be necessary to configure the <span style="color:darkgreen;">''JAVA_HOME''</span> environment variable. The recommended method is to use an installer package (.exe or .msi) as these will configure the necessary environment variables automatically.

Alternatively, a JDK can be installed from the [https://en.wikipedia.org/wiki/Windows_Package_Manager Windows Package Manager (WinGet)].

Example of installing on Windows using WinGet:
<pre>
:: install Oracle JDK version 17
> winget install Oracle.JDK.17

:: install OpenJDK version 17
> winget install ojdkbuild.openjdk.17.jdk
</pre>


=== JDK on macOS ===
=== JDK on macOS ===

Revision as of 21:17, 12 January 2026



Build Tools

JDK

The Stendhal server and legacy client are both written in Java. To run either requires a Java Runtime Environment (JRE). To compile server or client, a Java Development Kit (JDK) is necessary. Most JDK distributions include a JRE.

JDK on Unix

Some Unix/Linux/BSD systems have a JDK pre-installed (usually OpenJDK). If not, most will have a version available from the system package manager.

Example of installing on Ubuntu:

# install version 17
$ sudo apt install openjdk-17-jdk

Example of installing on Arch:

# install default version
$ sudo pacman -S jdk-openjdk

# install version 17
$ sudo pacman -S jdk17-openjdk

Example of installing on FreeBSD:

# install pre-built package of version 17
$ sudo pkg install openjdk17

# compile version 17 from Ports source
$ cd /usr/ports/java/openjdk17
$ sudo make install clean

JDK on Windows

Packages for Windows can be downloaded from either oracle.com or for OpenJDK, from jdk.java.net. If you download a portable .zip package, you will need to manually configure the PATH environment variable so the system knows where the java and javac executables are located. It may also be necessary to configure the JAVA_HOME environment variable. The recommended method is to use an installer package (.exe or .msi) as these will configure the necessary environment variables automatically.

Alternatively, a JDK can be installed from the Windows Package Manager (WinGet).

Example of installing on Windows using WinGet:

:: install Oracle JDK version 17
> winget install Oracle.JDK.17

:: install OpenJDK version 17
> winget install ojdkbuild.openjdk.17.jdk

JDK on macOS

Packages for macOS can be downloaded from either oracle.com or for OpenJDK, from jdk.java.net. But the recommended method is to install from the Homebrew Package Manager as it will configure the necessary environment variables automatically.

Example of installing on macOS using Homebrew:

# install version 17
$ brew install openjdk@17

Systems

Windows

GNU/Linux

Mac OS X

Android WebView Client

General information