Ganttproject does not start with AdoptOpenJDK


I want to substitude Oracle JRE on all my Windows 10 PCs with AdoptOpenJDK 1.8 (LTS):

When I start Ganttproject (current 2.8.10) there is a popup message showing “GanttProject needs JAVA 7 or higher. Please refer to to get support 1.7.0”

Which Version should be working - 32bit or 64 bit or both on a 64bit Windows?

The “ganttproject.log” is not updated since I changed the JRE.

(Dmitry Barashev) #2

If you use other distros, you may want to make sure that java command is in your PATH and use ganttproject.bat. More details are in “Installing from ZIP” instructions. Using ZIP distro per se is optional because ganttproject.bat is included into Windows installer and sits in GanttProject installation folder.



GanttProject.bat works as well as writing “javapath” in Windows Registry and start GanttProject regulary via the program icon. Set “JAVA_home” as global Windows environment variable did not work. Java\bin directory is in “PATH”.



I have the same problem. Changing and using ganttproject.bat works fine, but using the ganttproject.exe still fails.
What did you do in the Windows registry to fix it?
The path at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\ seems to be ok.

(Zanza) #5

i also use the JRE of adoptjdk and have the same problem with the error when launching ganttproject.
yes it works with the ganttproject.bat file but the problem is you cannot open gant-files directly and not with the bat-file. you have to open the bat and then open the gant-file in the program with “file -> open”

i have the java_home variable and edited the path variable.
“java -version” works in command line and also other java applications start successfully with the adoptjdk.

it would be great to have a solution for this since official java requires license for business users so a lot of people will migrate to openjava.

OK i found the solution to make ganttproject think that oracle java is installed while you point to adoptjre instead. it works and the ganttproject.exe launches successfully.
but i dont know if it will mess around with other java applications installed.
i attached a zip file with the reg file. all you have to do is change the path for “JavaHome” and “RuntimeLib” to the folder where you have your openjdk/jre. (422 Bytes)

(Dmitry Barashev) #6

ganttproject.exe is generated with launch4j tool, and support of JAVA_HOME or any other way of locating Java Runtime from other vendors is basically up to them.

They have an open ticket in their issue tracker where you can also find a workaround with setting required values in Windows registry manually:

Also, changing .gan file association from ganttproject.exe to ganttproject.bat works perfectly and makes GanttProject files opening with double click. This sits in HKEY_CLASSES_ROOT\.gan\shell\open\command

We understand that this turbulence with multiple Java Runtime vendors is sad. However, it seems that we all just have to wait a little bit until is settles down and all vendors and tools come to some common solution. From our side side we plan to ship GanttProject with our own Java Runtime starting from the next major update.



Zanzas regfile worked fine. I just changed the installation path to the distribution I am using.
Now everything works as expected.