3

I was unsure on whether to put this on Superuser or Stack Overflow, but I opted for here because it concerns software development regarding the Gosu programming language.

The Gosu programming language requires Java 8 and does not accept Java 11 or higher versions of the JDK/JRE (not sure which one is relevant). This is a problem because I have Java 11 and the development team has let this issue linger for a long time. It's on the bug tracker and nobody has done anything about it for a long time.

I need to set up a development environment with Java 8 and Java 11, install Gosu in the environment with Java 8, and then figure out how to modify the source code of Gosu so that it's compatible with Java 11. Is there any guidance from people who did development and project forking similar to this?

HolyKnowing
  • 121
  • 3
  • 15
  • 1
    I don't know anything from Gosu but one issue at least is that it seems to try to customize the Windows Look and Feel when run on macOS. The JDK hasn't includes the Windows LAF on non-Windows platforms for several releases. – Alan Bateman Apr 28 '19 at 13:43

3 Answers3

3

Regarding Gosu and Java 11, Gosu's latest release 1.15.0 supports Java 11 exclusively.

Scott
  • 949
  • 9
  • 14
2

I would download docker and set up separate docker containers for each of your jdk environments. And then in the appropriate one add whatever other dependencies the gosu language project has. the docker containers will keep the sets of dependencies separate and prevent them from interfering with one another.

Philip Wrage
  • 1,505
  • 1
  • 12
  • 23
2

This can be separated into 3 problems

  1. Installing multiple JDK versions
  2. Defaulting per project for your own development
  3. Selecting a specific version when running on OSX

For mainly local development you probably want a flow like

Install multiple JDK versions with brew

$ brew cask install caskroom/versions/java11
$ brew cask install adoptopenjdk/openjdk/adoptopenjdk8

$ ls /Library/Java/JavaVirtualMachines/
adoptopenjdk-12-openj9.jdk graalvm-ce-1.0.0-rc14      jdk1.8.0_65.jdk            openjdk-11.0.2.jdk

Select between then for your development with jEnv (works nicely with bash) https://www.jenv.be/

For scripts, if running in OSX use java_home

$ /usr/libexec/java_home -v 11
/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
$ /usr/libexec/java_home -v 1.8
/Library/Java/JavaVirtualMachines/graalvm-ce-1.0.0-rc14/Contents/Home
Yuri Schimke
  • 12,435
  • 3
  • 35
  • 69