Yaffaif Install Troubleshooting Guide

This is a step by step trouble-shooting guide for the install.

Java

Yaffaif will run anywhere there's a Java 8 Runtime Environment (JRE) with the JavaFX extension. JavaFX is included by default these days. That's the good news. The bad news is that some machines might have old versions installed that won't upgrade cleanly. The game requires a minimum version of Java 8u25, but there have been many security patches and improvements since then, so use the latest Java 8. There are also some operating system differences to be aware of.

Linux users will need to install the Oracle Java runtime from java.com . The GNU JVM and OpenJDK doesn't have the JavaFX bits (yet). You may also have to configure the Java plugin manually, so read the installation instructions with your download. If possible set up your package manager to pull the latest versions from Oracle. Ubuntu/Mint can use Web Upd8 .

MAC/OSX users will need to download and install the Oracle built Java from java.com  which only works on OSX Lion and later. The old Apple Java runtime isn't maintained and won't run Yaffaif. If you have a fresh OSX install you may need to put Apple's Java on first, then the Oracle one.

Windows users are the ones most likely to have an awkward version of Java that won't upgrade cleanly, but other wise have a simpler time of things. Start by visiting the uninstall old versions  page. Agree to the terms, and let it find old versions. Remove them and upgrade to the latest version. Double check by using the "Add or Remove Programs" from the Control Panel, or the equivalent on your windows version, to check for old versions.

Java Version Message

Yaffaif Java version warning

From version v0.42 the game performs checks on start-up to detect which version of Java is being used to run the game. If you see a window like the one to the right then the game is being run with a version of Java other than Java 8, and the user interface cannot be started due to the way Java was changed in Java 9 and later.

If you installed a different version just to run Yaffaif and it didn't work, then uninstall it and install Java 8. However, if you are using the other version for something else, install Java 8 as well and edit the Yaffaif start scripts to use Java 8.

Windows bat scripts

A work around is to edit the start.bat file (and startDebug.bat for debug).

First identify where Java 8 was installed, typically something like C:\Program Files\Java\jre1.8.0_221. The final three digits will change based on the patch level.

Then edit the start.bat file remove the four characters "REM " before the two set lines and change the first set statement for JAVA_HOME to match where your Java 8 runtime (or JDK) is. When complete the lines should look like this:


set JAVA_HOME=C:\Program Files\Java\jre1.8.0_221
set PATH=%JAVA_HOME%\bin;%PATH%

Launch the game by double-clicking the edited start.bat, or running it from a command prompt.

Note: If you update Java 8 then and remove the old version you will need to edit the script again to update the value of JAVA_HOME.

Unix/Linux and possibly Mac sh scripts

A work around is to edit the start.sh file (and startDebug.sh for debug).

First identify where Java 8 was installed, maybe something like /usr/bin/java/jre1.8.0_221. The final three digits will change based on the patch level.

Then edit the start.sh file remove the comment characters "# " before the two export lines and change the first export statement for JAVA_HOME to match where your Java 8 runtime (or JDK) is. When complete the lines should look like this:


export JAVA_HOME=/usr/bin/java/jre1.8.0_221
export PATH=$JAVA_HOME/bin:$PATH

Launch the game by double-clicking the edited start.sh, or running it from a command prompt.

Note: If you update Java 8 then and remove the old version you will need to edit the script again to update the value of JAVA_HOME.

More debugging

Windows Users

As a first step try launching the game by double clicking the start.bat file. The command window may give some details as to why the game is not launching. If this doesn't help proceed with the steps below.

Get a command line (shell) prompt

Once the correct version of Java is installed, the next step is to verify that the version running is the one expected. To do this, you have to get a command line (shell) prompt.

This varies by operating system. Linux users generally know how to start a terminal on their flavour of Linux. Mac OSX users should use the Launchpad then choose Other and then Terminal. Windows users should use Start, then choose All Programs, then Accessories, then Command Prompt.

Depending which operating system you are on your prompt may vary; it might be

I'll use $ here as an example. Whichever operating system you are on type:


$ java -version

If all is well and good you should get something like this back:


$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)

Any output that suggests the java command is not recognized or not found points to a problem with the PATH not including the java executable. It may be simplest to uninstall and then re-install Java.

If your version number is different, and less than 1.8.0_25 (like the above) the version of Java is too old. If you just installed a newer version then there's still an old one around. If the version begins "OpenJDK Runtime Environment" then you will need to switch to an Oracle Java Runtime. See the Java section above, and the notes on alternatives below.

Linux users may find that the version of Java being run is controlled by the "alternatives" system. Try executing:


$ alternatives --configure java

Try running Yaffaif

Once the right version of Java is available try running Yaffaif from the terminal. This usually offers insight as to why it isn't working. You will need to know where the real folder/directory is where you unpacked the game's zip file. Avoid using "virtual" directories (such as Windows Libraries) which may not appear at the command prompt.

First use the cd command to navigate to where you unpacked the GameFX2.zip file (in this example mine is in D:\tmp). On Windows you may need to change the drive letter first, which is shown below.


C:> D:
D:> cd \tmp
D:\tmp> cd yaffaif\GameFX2

Then type the following to execute Yaffaif:


D:\tmp\yaffaif\GameFX2> java -jar GameFX2.jar

You should see something like the following output in the terminal window before the game user interface appears.


D:\tmp\yaffaif\GameFX2> java -jar GameFX2.jar
Looking for C:\Documents and Settings\David Cooke\gamefx2.props.

If, instead, the output suggests that GameFX2.jar is corrupt, try downloading and unpacking the game again.

If the output suggests that GameF.jar cannot be found check that your archiver hasn't flattened the folder hierarchy or unpacked the jar files into classes (I'm looking at you BreeZip). In the folder that has GameFX2.jar there should be a folder called lib. In this folder there should be GameF.jar.

File manager properties

If Yaffaif works from the command line above, but doesn't work when you double-click on GameFX2.jar in your file manager, finder, windows explorer, then there's a good change the file associations are incorrect. It may be that that type of file is associated with another program (sometimes an archiver).

To fix the problem, you need to change the association so the file is opened with Java when you double-click it. This varies from one file manager to another.

See also

jnlpjarlib