Announcement

Collapse
No announcement yet.

Specify which Java version the Mirth service will use in Windows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    nicovn
    OBX.2 Kenobi

  • nicovn
    replied
    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.:

    /usr/lib/jvm/java-11-amazon-corretto



    Kind Regards

    Nico
    Amaron.be

    Leave a comment:

  • jterris
    Mirth Newb

  • jterris
    replied
    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.

    Leave a comment:

  • agermano
    Mirth Guru

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

    Leave a comment:

  • jterris
    Mirth Newb

  • jterris
    replied
    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

    Leave a comment:

  • pacmano
    Mirth Guru

  • pacmano
    replied
    You can of course throw a container or VM on there. Do and then ask for forgiveness .

    Leave a comment:

  • jterris
    Mirth Newb

  • jterris
    replied
    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.

    thx!

    Leave a comment:

  • agermano
    Mirth Guru

  • agermano
    replied
    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.

    Leave a comment:

  • jterris
    Mirth Newb

  • jterris
    replied
    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.

    Leave a comment:

  • agermano
    Mirth Guru

  • agermano
    replied
    See this post https://forums.mirthproject.io/forum...-jre-1-8-0_291

    Leave a comment:

  • jterris
    Mirth Newb

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

    Hello,
    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
Working...
X