Running GanttProject on macOS Mojave with Java 10

I try to open the application for the first time but I get the command “Unable to load java runtime environment”.

Please install Java Runtime. You can download Java from https://java.com

I’m experiencing this problem with GanttProject 2.8.9 after I updated my MacOS to Mojave.
I have java installed in my machine, and it was working just fine before the system update.
Suggestions?

Java environment:
java version “10.0.1” 2018-04-17
Java™ SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot™ 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

How did you install Java 10 on macOS and how do you get this information about Java environment on your Mac?

Java got updated automatically.
I checked the version by typing “java -version” in the terminal

What these commands:
which java

and

/usr/libexec/java_home -V

tell you?

I have the same issue. Gantt project used to work fine, now I get the “Unable to load Java Runtime Environment”.

My setup is:

macOS Mojave 10.14.1 (18B75)

java --version

java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

which java

/usr/bin/java

/usr/libexec/java_home -V

Matching Java Virtual Machines (1):
    10.0.2, x86_64:	"Java SE 10.0.2"	/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home

Can you try running ZIP distro? Since you can launch java from the terminal, it must be enough to unzip it and run ganttproject.sh or ganttproject.command from the distro.

Thanks for the prompt reply, Dmitry.
I downloaded the ZIP distro, double-clicking on gantproject or gantproject.command opens the app successfully (of course, it also opens a terminal window, which is distracting).

Cool, thanks. Can you try running Java launcher from the terminal as well and post what it outputs? It should look like this:

/Volumes/GanttProject\ 2.8.9/Contents/MacOS/JavaAppLauncher

provided that GanttProject dmg is mounted as volume.

If I just run in terminal:
/Volumes/GanttProject\ 2.8.9/GanttProject.app/Contents/MacOS/JavaAppLauncher

I get no terminal output. Terminal is blocked until I click the “OK” in the error popup, then the app terminates, and no output is shown in between.

Do you mean, you still get “Unable to load Java Runtime Environment” popup? Finally, what if you explicitly set
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home before running JavaappLauncher?

Yes, I get the “unable to load Java Runtime Environment”.
Even with the export command, same result.

45

May I ask you to test a new build with updated JavaAppLauncher? You can download a DMG file from here: https://www.dropbox.com/sh/0gwuayq6vg0kyss/AAApogLPlvpg0lY9JltS-3sZa?dl=0&preview=ganttproject-2.8.10-r2360.dmg

Hi Dmitry,

here is what I tried:

  • Double click on the image file -> double click on the app -> No feedback, app doesn’t open
  • Copy app from image to local folder -> double click on the app -> No feedback, app doesn’t open
  • Run JavaAppLauncher from terminal -> App opens correctly
  • Double click on the app on local folder again -> from now on, App opens correctly (but the first time, it failed)

So the launcher it works now, but it seems a bit random that it was not working before copying & running by terminal the first time.

Is this reproducible? I mean, if you remove the app from your local folder, will it fail to start from the dmg?

I tried again.

Opening directly from the image does not work, no matter how many times I double click on it.
Copying the app to local folder, it will not work the first time I double click on it, but it will work from the second time onward.

It might still be a bit confusing for new users, but from my point of view, I can now run the application so my problem is solved.

Thanks for your help!

May I ask you to assist in the really working solution? What is the terminal output if you run JavaAppLauncher from the disk image in Terminal?

Sure.

My steps:

  • Download from the link you sent me
  • Mount image
  • open /Volumes/GanttProject\ 2.8.10/GanttProject.app/

Result:

  • I get a popup that says “GanttProject.app is an app downloaded from the Internet. Are you sure you want to open it?”. I pick “Open”, and nothing happens. The terminal returns to the input.

Next attempt:

  • /Volumes/GanttProject 2.8.10/GanttProject.app/Contents/MacOS/
    Result:
  • No popup is displayed. The application opens immediately (success!)

Can you open Console application (hopefully there is one in Mojave) and copy records from there after unsuccessful attempt?