Running GanttProject on macOS Mojave with Java 10

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?

There is a lot of stuff in the console unrelated to the JavaLauncher. However, here it is: https://pastebin.com/nAesJ7HZ

Thanks! This provides some clues. However, I am not sure that I can easily solve the root issue, especially given that I have no Mojave at hand.

However, let’s try other way round. I created a new app with other launcher. The launcher essentially executes shell script. It does not search for any Java Runtime and just relies on java command to be in the PATH. It seems to work fine on my Mac OS Sierra. Can you please try if it works on Mojave?

File: https://www.dropbox.com/sh/0gwuayq6vg0kyss/AAApogLPlvpg0lY9JltS-3sZa?dl=0&preview=ganttproject-2.8.10-r2362.dmg

It will show an additional text are window and the application will be called “Boot” in the main menu and Docker – that’s expected.

I tried the last built you sent.

If I mount the image and double click the application, it starts correctly.