I think I’ve found the issue.
I restarted my machine and closed/quit all other tasks. I opened my Defold project and it works!
It looks to me that there was another task running that caused a conflict with Java.
Java wasn’t getting initialized when starting Defold.