Installation: Difference between revisions
No edit summary |
m Suggest not using Oracle for ease |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
== Dependencies== | == Dependencies== | ||
===Java | ===Java 17 or higher=== | ||
KoLmafia depends on | KoLmafia depends on Java 17 or higher The recommended version is linked at the top of every page of kolmafia.us. If you are executing KoLmafia from a jarfile, you will need to install Java first. | ||
If you do not have a recent version of Java, the recommended version (as of this writing) is [https://adoptium.net/index.html Java 17]. | If you do not have a recent version of Java, the recommended version (as of this writing) is [https://adoptium.net/index.html Java 17]. | ||
Oracle may have issues, for simplicity use [https://adoptium.net/temurin/releases/ Adoptium]. Any OpenJDK build should be okay too like [https://www.azul.com/downloads/#zulu Zulu Java]. | |||
====Testing your Java installation==== | ====Testing your Java installation==== | ||
Line 24: | Line 26: | ||
<code>Michaels-MBP:~ mcroft$ java -version<br />openjdk version "16.0.1" 2021-04-20<br />OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9)<br />OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode, sharing)</code> | <code>Michaels-MBP:~ mcroft$ java -version<br />openjdk version "16.0.1" 2021-04-20<br />OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9)<br />OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode, sharing)</code> | ||
==== | |||
== Troubleshooting Runtime Issues== | |||
=== Java Errors=== | |||
Please be aware that some older versions of Java do not get completely replaced when installing a newer version. Usually this happens with Java 8 JRE and Java 11+ JDKs. If that makes no sense, just delete Java 8. | Please be aware that some older versions of Java do not get completely replaced when installing a newer version. Usually this happens with Java 8 JRE and Java 11+ JDKs. If that makes no sense, just delete Java 8. | ||
If you get a message like this:<code>Error: A JNI error has occurred, please check your installation and try again.</code> Please [https://kolmafia.us/threads/java-11-now-required-for-kolmafia-java-17-recommended.26579/ read this announcement]. | If you get a message like this:<code>Error: A JNI error has occurred, please check your installation and try again.</code> Please [https://kolmafia.us/threads/java-11-now-required-for-kolmafia-java-17-recommended.26579/ read this announcement]. | ||
===HiDPI | ===Scaling support on HiDPI Monitors=== | ||
If the KoLmafia application is unexpectedly small on a [https://techterms.com/definition/hidpi HiDPI]/Retina Display monitor, then support for HiDPI should enabled. This should only be required on Linux, since HiDPI support is enabled automatically on Windows and MacOS. | |||
On Linux, using HiDPI with a Java Swing application (such as KoLmafia) requires that you execute the '.jar' file with an option set as follows: <code>java -Dsun.java2d.uiScale=<multiplier> -jar <jarfile></code> | |||
Depending on the screen size, a multiplier of 1.6 or 2.0 may be appropriate. You may need to experiment to find the ideal scaling multiplier for your screens. | |||
[[Category:Tech Support]] | [[Category:Tech Support]] | ||
[[Category:New User Help]] | [[Category:New User Help]] |
Latest revision as of 17:10, 8 August 2023
How to Download the latest version.
The latest source build can be downloaded from the following locations:
Both of these sources have tested versions that are posted shortly after developers change code.
The GitHub releases page contains both the KoLmafia-xxxxx.jar java binaries and installers for an experimental version that includes a bundled version of Java. If you use the installers, they manage the Java dependency listed below, but it can be more difficult to troubleshoot issues.
Dependencies
Java 17 or higher
KoLmafia depends on Java 17 or higher The recommended version is linked at the top of every page of kolmafia.us. If you are executing KoLmafia from a jarfile, you will need to install Java first.
If you do not have a recent version of Java, the recommended version (as of this writing) is Java 17.
Oracle may have issues, for simplicity use Adoptium. Any OpenJDK build should be okay too like Zulu Java.
Testing your Java installation
From a Command Prompt (or Terminal) window, enter java -version
If that returns something like this, you should be good to go.
Michaels-MBP:~ mcroft$ java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9)
OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode, sharing)
Troubleshooting Runtime Issues
Java Errors
Please be aware that some older versions of Java do not get completely replaced when installing a newer version. Usually this happens with Java 8 JRE and Java 11+ JDKs. If that makes no sense, just delete Java 8.
If you get a message like this:Error: A JNI error has occurred, please check your installation and try again.
Please read this announcement.
Scaling support on HiDPI Monitors
If the KoLmafia application is unexpectedly small on a HiDPI/Retina Display monitor, then support for HiDPI should enabled. This should only be required on Linux, since HiDPI support is enabled automatically on Windows and MacOS.
On Linux, using HiDPI with a Java Swing application (such as KoLmafia) requires that you execute the '.jar' file with an option set as follows: java -Dsun.java2d.uiScale=<multiplier> -jar <jarfile>
Depending on the screen size, a multiplier of 1.6 or 2.0 may be appropriate. You may need to experiment to find the ideal scaling multiplier for your screens.