FAForever / downlords-faf-client

Official client for Forged Alliance Forever
https://faforever.com
MIT License
196 stars 121 forks source link

[Linux] Compatibility with Java 11 #1277

Closed dhardy closed 5 years ago

dhardy commented 5 years ago

My system (Fedora 30) has Java 11 installed:

$ sudo dnf list --installed |rg java-11
java-11-openjdk.x86_64                           1:11.0.3.7-5.fc30                     @updates                     
java-11-openjdk-devel.x86_64                     1:11.0.3.7-5.fc30                     @updates                     
java-11-openjdk-headless.x86_64                  1:11.0.3.7-5.fc30                     @updates                     

Pointing at this installation alone is not enough to let the client run:

$ export INSTALL4J_JAVA_HOME=/usr/lib/jvm/java-11
$ ./downlords-faf-client 
No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be 10.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

However, if I remove the following check from the script, it launches fine:

  if [ "$ver_major" -gt "10" ]; then
    return;
  fi

Summary: please update your installation script to allow use of newer versions of Java (at least 11).

1-alex98 commented 5 years ago

script is not offical pleas make an issue on the repo of the script

dhardy commented 5 years ago

Ah, that's why I couldn't find the script. Which repo?

1-alex98 commented 5 years ago

https://github.com/FAForever/downlords-faf-client/wiki/Install-on-Linux

dhardy commented 5 years ago

But that's a wiki on this repo which links to @tatsujb's guide (which also doesn't include the launch script).

Is the ./downlords-faf-client script not generated by install4j or some such?

tatsujb commented 5 years ago

@axel1200 to clarify, this is a "please port to java 11" thread if I understand correctly. I don't think he's necessarily using my script. and if he were he wouldn't have any issues because my script secretly downloads a java 10 folder (without installing it) into the dir I install FAF to and adds the install4J pointer to this folder into the user's .bashrc.

This (admitedly dirty) solution makes FAF run without installing (at least not really) java 10

dhardy commented 5 years ago

Correct, I am not using @tatsujb's script. The system-packaged Java 11 installation works fine, aside from the downlords-faf-client script included in the unix tarball.