Installation: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
Created page with '{TOCright} == Windows Installation == Windows users have the option of using either an .exe file or a .jar file. For those uncomfortable with checking on advanced Java setting…'
 
m Suggest not using Oracle for ease
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{TOCright}
{{TOCright}}
== Windows Installation ==


== How to Download the latest version. ==
The latest source build can be downloaded from the following locations:


Windows users have the option of using either an .exe file or a .jar file.
# [http://builds.kolmafia.us/ builds.kolmafia.us]
# the [https://github.com/kolmafia/kolmafia/releases GitHub releases page].


For those uncomfortable with checking on advanced Java settings and configuration, using the .exe is recommended. The .exe file is always available with the latest stable release, and weekly builds of the .exe are also posted each Sunday night on the Daily Builds page.
Both of these sources have tested versions that are posted shortly after developers change code.


The latest stable version can be downloaded at the Sourceforge KoLmafia [http://sourceforge.net/projects/kolmafia/files/ files page].
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.


The latest daily build can be downloaded from [http://builds.kolmafia.us/ here].
== Dependencies==


For more information on download options, please see the [http://kolmafia.sourceforge.net/manual.html Sourceforge Manual].
===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 [https://adoptium.net/index.html Java 17]. 


== Mac Installation ==
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].


If you are running Mac OS X 10.4.x or higher, you do not need to download or install a separate JRE. If you are running Mac OS X 10.3.9, then you will need to upgrade your Java to 1.4 by going here: [http://support.apple.com/downloads/Java_for_Mac_OS_X_10_3_Update_5 Java Update for Mac OS X v10.3.] If you are running Mac OS X 10.2.6, then you will need to upgrade your Java to 1.4 by going here: [http://docs.info.apple.com/article.html?artnum=120242 Java Update for Mac OS X v10.2.6.] If you are running an older version of Mac OS, unfortunately, KoLmafia will likely not run on your system.
====Testing your Java installation====
From a Command Prompt (or Terminal) window, enter <code>java -version</code>


Once you have made sure you have an operating system and version of Java high enough to run KOL mafia, [http://sourceforge.net/projects/kolmafia/files/ you can download it here.]
If that returns something like this, you should be good to go.


From this page choose the .dmg file and the download will start. Once the download is finished, a finder window will open. Drag the KoLmafia icon into the Applications alias. Then on your sidebar choose Applications, and find KoLmafia. Then you're good to go!
<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.


----
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].


Please note that unlike in the windows version that the DMG and JAR KoLmafia application saves out your session, scripts, and user data '''NOT''' in the same folder as the launcher.
===Scaling support on HiDPI Monitors===
The files are located at - /Users/'''username'''/Library/Application Support/KoLmafia


Tip - if you wish to sync your KoLmafia script/data folders automatically to say dropbox and other computers you can easily do this by using a Symbolic Link between the two locations, example command given below:
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.


ln -s /Users/'''username'''/Library/Application\ Support/KoLmafia/ /Users/'''username'''/Documents/Dropbox/Files/
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>


*Information to create the link gotten from this location - [http://www.macosxhints.com/article.php?story=20090929052128498]
Depending on the screen size, a multiplier of 1.6 or 2.0 may be appropriateYou may need to experiment to find the ideal scaling multiplier for your screens.
 
 
== Linux Installation ==
 
For a Linux user, the .jar versions of KoLMafia are ideal. Simply download the .jar, and place it in whatever directory you wishKoLMafia will store its data in ~/.kolmafia, and any scripts you want to access through the Scripts menu should be installed into ~/.kolmafia/scripts.
 
If clicking on the .jar in your favorite file manager does not invoke it:
*Make sure you have a recent Java VM installed (Sun or Blackdown both work. The target Java version for KoLMafia is currently 1.4)
*Make sure your desktop environment knows to use 'java -jar' to invoke .jars


[[Category:Tech Support]]
[[Category:Tech Support]]
[[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:

  1. builds.kolmafia.us
  2. the GitHub releases page.

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.