2 Replies Latest reply on Jan 8, 2016 1:26 AM by jaysensharma

    Not able to change java home path in wildfly 9.0.2

    nish18

      Hi ,

      I am using java 8 and when I am trying to deploy war file on wildfly server . Its giving error :

       

      Caused by: java.lang.UnsupportedClassVersionError: demo/Demo_Servlet : Unsupported major.minor version 52.0

        at java.lang.ClassLoader.defineClass1(Native Method)

       

      My system variable and all java path are set properly to java 8.

       

      Only java home path for wildfly server is set to java 7. I tried to changed it through admin console of wildfly server.

      On clicking on edit, it again change back to java 7 path.Changes are not getting updated.wildfly.JPG

       

      Can someone please help on this.

        • 1. Re: Not able to change java home path in wildfly 9.0.2
          jaysensharma

          Did you set the JAVA_HOME to point to JDK 1.8 installation inside the   "wildfly-9.0.2.Final/bin/standalone.conf"    (on WINDOWS edit the file "standalone.conf.bat" ) instead.

           

          Unix Based OS "standalone.conf"

          JAVA_HOME="/PATH/TO/jdk1.8.0"
          
          

           

           

          Windows Based OS "standalone.conf.bat"

          set "JAVA_HOME=C:\opt\jdk1.8.0"
          set "JAVA=C:\opt\jdk1.8.0\bin\java"
          
          



          Regards

          Jay SenSharma

          • 2. Re: Not able to change java home path in wildfly 9.0.2
            jaysensharma

            If you are in domain mode then you can define the JAVA_HOME for individual servers inside the    "host.xml" file  as following:

             

                <servers>
                    <server name="server-one" group="main-server-group">
                        <jvm name="test" java-home="C:\opt\jdk1.8.0" />
                    </server>
                    .
                    .
                </servers>
            

             

             

            Regards

            Jay SenSharma