3 Replies Latest reply on Jul 3, 2018 5:18 AM by rhn-support-abhati

    Different jdk versions for multiple applications in 1 instance

    aiya0933

      Hi all,

       

      I have setup a single instance of Wildfly Application Server. I like to check if it is possible to configure different JDK versions for different application within the same instance?

      Is it to add more than 1 jdk entry in the system environment variables?

       

      Would appreciate any kind advice.

       

      Thanks,

      Angela

        • 1. Re: Different jdk versions for multiple applications in 1 instance
          rhn-support-abhati

          Hi Angela,

           

          This is not possible iif you are running wildfly in standalone mode.If you are running in domain mode, then you can set different JVM's for different server groups and can use it.

          If you want to run applications with different JDK in standalone mode, then you have to create multiple instances of wildfly and set the system variable.

          • 2. Re: Different jdk versions for multiple applications in 1 instance
            aiya0933

            Hi,

             

            To set the system variable for multiple instances of wildfly, is it to indicate the various JDK versions (e.g. C:/Program Files/Java/jdk1.8.0_162, C:/Program Files/Java/jdk1.8.0_172) under "Environment Variables" parameter <path>? Will the instances of wildfly know which java version to reference to?

             

            Appreciate your kind advice.

            • 3. Re: Different jdk versions for multiple applications in 1 instance
              rhn-support-abhati

              Hi,

               

              You can control the version of JDK in wildfly by pointing JAVA_HOME to the path of the desired Java version.

              You can find JAVA_HOME in the standalone.conf.bat or domain.conf.bat configuration files.

              Just bear in mind that instances running different versions of Java should not be clustered together.

              In other words, it is not recommended to have a Managed Server of "Host Controller A" and a Manged Server of "Host Controller B" in the same JBoss cluster, running on different version of Java. Such a setup, could lead to issues due to different JDK classes.