4

I am trying to run Freemind 1.0.1 on a Windows 10 machine with OpenJDK. When I try to launch it from the Start menu or try to open a .mm file in File Explorer, I get an error message saying

This application requires a Java Runtime Environment 1.5.0.

In both cases, Windows presumably tries to run C:\Program Files (x86)\FreeMind\FreeMind.exe (launching it directly gives me the same result). The same folder also has a batch file Freemind.bat, which launches Freemind successfully.

I am running OpenJDK 13.0.2, and java.exe is on my default PATH.

Is there a way to get the EXE wrapper to play nicely with OpenJDK 13? Or is that a bug which is hard-coded into the binary?

user149408
  • 1,142

3 Answers3

7

Change the registry in this way depening on your installed JDK, then freemind.exe will work. In my case a key for "Java Runtime Environment" was missing. I added the version info from the existing JDK-info.

Registry path:

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\11]

Registry entry:

"JavaHome"="C:\\Program Files\\Eclipse Adoptium\\jdk-11.0.14.101-hotspot\\"
3

I reached the same issue with openjdk 15 but noticed that I can use "C:\Program Files (x86)\FreeMind\Freemind.bat" successfully.

Here is what I did:

  • I modified launcher in start menu to use "C:\Program Files (x86)\FreeMind\Freemind.bat" instead of "C:\Program Files (x86)\FreeMind\Freemind.exe"

  • To solve file association issue which still links to exe , I opened the registry editor (regedit.exe) as admin, and modify HKEY_CLASSES_ROOT\Freemind\shell\open\command from "C:\Program Files (x86)\FreeMind\freemind.exe" "%1" to "C:\Program Files (x86)\FreeMind\freemind.bat" "%1"

  • The freemind.bat uses relative path so launching from another location won't work : I also edited the Freemind.bat file, inserting a new line in the second line with the following : cd "C:\Program Files (x86)\FreeMind" , the .bat file looks like this

@echo off
cd "C:\Program Files (x86)\FreeMind"
java -Xmx256M -Xss8M -cp lib\freemind.jar;lib\commons-lang-2.0.jar;lib\forms-1.0.5.jar;lib\jibx\jibx-run.jar;lib\jibx\xpp3.jar;lib\bindings.jar;lib\xalan.jar;lib\serializer.jar;lib\xml-apis.jar;lib\xercesImpl.jar;lib\jortho.jar freemind.main.FreeMindStarter

It works fine for me with these 3 steps , hope this will be useful

Julien L
  • 31
  • 1
0

Just to add to this - I ran into problems running Freemind as others have.
I resorted to using the .bat file but called by adding the following: -Djava.security.manager=allow

So something like...

java -Djava.security.manager=allow  -Xmx256M -Xss8M -cp lib\freemind.jar;lib\commons-lang-2.0.jar;lib\forms-1.0.5.jar;lib\jibx\jibx-run.jar;lib\jibx\xpp3.jar;lib\bindings.jar;lib\xalan.jar;lib\serializer.jar;lib\xml-apis.jar;lib\xercesImpl.jar;lib\jortho.jar freemind.main.FreeMindStarter

Note: Credit to judovana over at https://github.com/stefanbirkner/system-rules/issues/85 and https://openjdk.org/jeps/411

Toto
  • 19,304
Keith
  • 1