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.
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.
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.