bardsoftware / ganttproject

Official GanttProject repository.
http://ganttproject.biz
GNU General Public License v3.0
864 stars 303 forks source link

Issues with launching GanttProject on macOS #1637

Open dbarashev opened 5 years ago

dbarashev commented 5 years ago

Symptoms and Summary

You have macOS and you can't launch GanttProject application. It either says "Unable to load Java Runtime environment" or just nothing happens after double-clicking the application. These issues are reportedly specific to macOS Mojave with Java 10, however, there are chances of seeing them on other combinations of macOS versions and Java Runtimes.

Unfortunately, currently Java ecosystem passes a kind of turbulence, and vendors of Java Runtimes, operating systems and launcher applications cannot always agree with each other about the location of Java on the file system, and this is especially true on macOS.

Below you can find two approaches to fixing this issue.

Distribution with bundled Java Runtime

The first approach is using GanttProject distro with bundled Java Runtime. We will officially start buildign such distros for all platforms with the next major GanttProject release, but meanwhile, we prefer to distribute GanttProject with no bundled Java. However, there is a special experimental GanttProject distro with bundled Java 11 Runtime for macOS which is available from our Dropbox folder. This distro is somewhat experimental, however, it is reported to be working. It is supposed to run fine without any additional downloads.

Pointing GanttProject to your existing Java Runtime

The second approach is to make GanttProject aware of your installed Java Runtime.

Essential diagnostics

Make sure that you really have Java Runtime. Open Terminal application and type java -version command. If Java Runtime is installed, you should see something like

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)

Solution

  1. If Java Runtime is not installed, please install it. For GanttProject 2.8+ Java Runtime version 8 is recommended, although more recent versions most likely will be okay.
  2. If Java Runtime is installed, and you can run java in Terminal, you have a few options. First is to just try running GanttProject again. According to tests from our users it may help. If it does not then please try using fallback distro for Mojave which basically runs a shell script which executes java command with appropriate arguments.
giansalvo commented 5 years ago

I confirm the same behaviour (nothing happens after double-clicking the application) on this setup: macOS HighSierra 10.13.4 java 1.8.0_131

I confirm that using the "fallback distro for Mojave" works fine.

I hope that the problem will be fixed in a future release...

tmdoit-zz commented 5 years ago

Same here, fallback distro for Mojave works.

java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode) Mojave 10.14

eberleb commented 5 years ago

Nothing works for me...installed Java and then when I open gannt I get that I needs to install a jdk file...already did it. Nothing works...not even fallback for Mojave! Deadline for doing this project is Sunday evening. Please help

dbarashev commented 5 years ago

@eberleb what java -version command says?

rorschach77733 commented 5 years ago

Same for me.

java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

hallda commented 5 years ago

I'm running MacOS 10.14.5 and have jre-8u211-macosx-x64 installed, but kept getting an error message, and not opening.

The solution was that I did not have the Java Development Toolkit installed. Installing that, and everything works fine now.

OxMalaeorum commented 5 years ago

java version "12.0.2" 2019-07-16 Java(TM) SE Runtime Environment (build 12.0.2+10) Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing) Mojave 10.14.6

checked version in terminal. double-clicked application again. Ran successfully.

hsdwatkins commented 4 years ago

I can't seem to get the application GanttProject to open. I downloaded with Google Chrome on an early-2011 MacBookPro running High Sierra. I tried downloading both versions (with and without Java) and when I double click the icon, nothing happens in each case. Please help!

dbarashev commented 4 years ago

Please start with Essential diagnostics section above. Please post the results of executing java -version in the Terminal window.

hsdwatkins commented 4 years ago

Screen Shot 2020-03-24 at 8 42 26 PM

dbarashev commented 4 years ago

GanttProject requires Java 8+. You have Java 6. Please remove it and install Java Runtime version 8.

hsdwatkins commented 4 years ago

That's really strange because I could've sworn I downloaded and installed Java 8 yesterday? (See attached screenshots) Screen Shot 2020-03-24 at 10 15 49 PM Screen Shot 2020-03-24 at 10 18 35 PM

dbarashev commented 4 years ago

Did you install it? Java 6 comes by default on old Mac OSX, while Java 8 needs to be downloaded and installed. When I say "install", I mean "run the installer which sits on Java 8 Update 241 disk"

dbarashev commented 4 years ago

Also, if you have not tried it yet, I really recommend to try using "Distribution with bundled Java runtime" (see the knowledge base article text). It comes with its own Java Runtime and does not care what other JRE are installed. I think it must be compatible with High Sierra.

hsdwatkins commented 4 years ago

So I doubleclicked the Java 8 Update 241, just to make sure I did in fact install it. The install seems to have been done (see attached screenshot, just taken a few moments ago), but when I go back to the terminal, it still says I'm running Java 6. I also tried opening the GanttProject program again and same thing as before happens (i.e. nothing at all). Screen Shot 2020-03-24 at 10 38 31 PM

dbarashev commented 4 years ago

Okay, so most likely you have two Java Runtimes now and Java 6 just happens to be the default. I don't remember if there is Java Control Panel in the Settings -- probably there is and chances are that you can choose the default runtime. But really, try using distro with bundled JRE first.

Willz01 commented 4 years ago

I have a Mac Cataliana downloaded the normal Gantt project and it gave still gave some problems, then I downloaded the mojava-falldown version and it works perfectly.