Using open Java instead of Oracle version

Hi everybody,
I have some trouble with continue using GanttProject because of the license changes of Oracle regarding Java. I am not allowed to use an unlicensed version of a software at my institution, also I am not allowed to use old not updated versions of a software, because of internet security (virus, spam, etc.). Consequently using Java from Oracle is no option for me anymore. Instead I installed an open Java version AdoptOpenJDK (https://adoptopenjdk.net/). Nevertheless when I start GanttProject it keeps asking me to install the newest Java version before launching.

It would be supper helpful to get some advise to make GanttProject work with some kind of Open-Java software. I really would like to go on using GanttProject.

Looking forward to some recommendations.

Best Regards,
Marius

What operating system you are using?

Sorry, of course I should have mentioned the OS: I am using Windows 10 Pro.
Do not judge me for using Windows! :wink:

So, GanttProject runs with Java 8 from any vendor. However, our dear vendors at the moment can’t agree on standard registry keys where Java launchers (native Windows executables which essentially search for required Java runtime and launch Java machine) can find them. If launcher can’t find any good Java runtime, it shows you the message.

GanttProject 3.0 will come with bundled Java runtime which will make this process more smooth. Meanwhile, you can try running ganttproject.bat which works with any vendor, provided that java executable is reachable from the user PATH variable (a set of folders where windows searches for executable files). I hope that most vendors put their java.exe into a folder which is registered in PATH.

See instructions on installing from ZIP for more details

I’m running with no issues using the Amazon distro of OpenJDK, Corretto.

The downloads for Corretto 8 are located here: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html

@DimitryBarashev: which registry key(s) does GanttProject check for, when looking for (Oracle’s) Java launcher?
I’m trying the same thing as Marius, and I wonder if tweaking the right registry key(s) might guide the GanttProject executable to use OpenJDK.

For the record, it is not GanttProject who searches for the registry keys, in the sense that it is not code which we wrote or which is under our control. It is Launch4j who does.

As far as I can see from their source code, they search for keys in these entries:

"SOFTWARE\\JavaSoft\\Java Runtime Environment"
"SOFTWARE\\JavaSoft\\Java Development Kit"
"SOFTWARE\\JavaSoft\\JRE"
"SOFTWARE\\JavaSoft\\JDK"
"SOFTWARE\\IBM\\Java Runtime Environment"
"SOFTWARE\\IBM\\Java Development Kit"

Docs from Oracle:
https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-microsoft-windows-platforms.htm#JSJIG-GUID-C11500A9-252C-46FE-BB17-FC5A9528EAEB

Thank you for the quick reply. Very good - I will experiment a little with these. :slightly_smiling_face:

With the updated JRE from Oracle, you can run Gantt Project. see Gantt Project will not open on Windows 10, with Java 12

I got the following on starting via batch file under windows 10 with a fresh install of the open JDK 11, with the HotSpot JVM - the startup is otherwise successful:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.itextpdf.text.pdf.MappedRandomAccessFile$1 (file:/C:/Program Files (x86)/GanttProject-2.8/plugins-2.8.10/org.ganttproject.impex.htmlpdf/lib/itextpdf-5.3.1.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.itextpdf.text.pdf.MappedRandomAccessFile$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

I have no idea what reflective access is, or who itextpdf is, but the error text suggests that some coordination might be needed between Gantt Project and the itextpdf library maintainer.

Hi, i have the same problem. Impossible to open gantt project. Nothing hapen. How to do? Sorry ma English is very bad…

If you have the same issue as described in this topic (running GanttProject with Java Runtime from a vendor other than Oracle) then the same workarounds which are written above will help.

Otherwise, please give us a little bit more details on your problem. GanttProject version? Operating system? Java Runtime version and vendor? What happens when you start GP? etc.

A post was split to a new topic: Laurent_Nobs: GanttProject Launch issues