No announcement yet.

Specify which Java version the Mirth service will use in Windows

  • Filter
  • Time
  • Show
Clear All
new posts

  • Specify which Java version the Mirth service will use in Windows

    I have a two different versions of Java installed on my Windows server and I want the Mirth service to use a different version than the default system one.

    Is there a way to set this in the config or vmoptions files?

    thank you

  • #2
    See this post


    • #3
      Yeah, I saw that post but I don't want to change the version of Java that the system uses (other applications rely on this) but I want Mirth to use a different version that I have installed.


      • #4
        The system java is usually specified by JAVA_HOME. Only certain applications (like mirth) will look at the EXE4J_JAVA_HOME variable. Additionally, if you have the service running as a limited user, you should be able to set the variable only for that user instead of system wide.

        This is much easier on Linux as you can set the variable only for the service.


        • #5
          Yeah, Linux would have been better but I didn't have that option.
          It's running as a generic service rather than a user but I'll try it with the EXE4J_JAVA_HOME variable and see what happens.



          • #6
            You can of course throw a container or VM on there. Do and then ask for forgiveness .
            Diridium Technologies, Inc.


            • #7
              Unfortunately, setting the EXE4J_JAVA_HOME didn't seem to work (see screenshot of system variables vs Mirth Connect Manager).
              Any other ideas?

              Attached Files


              • #8
                Try it without the bin folder at the end (use the JAVA_HOME variable right below it as an example.)


                • #9
                  That didn't work unfortunately.
                  I have Corretto 11 and Oracle 8 installed.
                  If I change the order of each folder in the Path variable then I can change which version responds to "java -version" from a command prompt but Mirth always picks the Oracle 8.
                  I can't figure out why.


                  • #10
                    This should help you ... works on linux and Windows:

                    If you want to use a non-default java JDK you can do so by creating a file “pref_jre.cfg” in folder “/opt/Mirth Connect/.install4j”

                    The file should contain a single line with the path to your java home folder; e.g.:


                    Kind Regards

                    Nico Vannieuwenhuyze