While I was typing the final "ant all" command for hybris, it miserably failed with the following exception
hybris/bin/platform/resources/ant/antmacros.xml:123: java.lang.UnsupportedClassVersionError: de/hybris/ant/taskdefs/DbDriverValidator : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method)
Even though a "java -version" gave me back version 8, ant is still using $JAVA_HOME variable.
So you have to change it into the script. My suggestion is that you adapt the setantenv.bat script with the JAVA_HOME directly
@echo off
set ANT_OPTS=-Xmx512m -Dfile.encoding=UTF-8
set ANT_HOME=%~dp0apache-ant-1.9.1
set JAVA_HOME=C:/Program Files/Java/jdk1.8.0_101
set PATH=%ANT_HOME%\bin;%PATH%
rem deleting CLASSPATH as a workaround for PLA-8702
set CLASSPATH=
echo Setting ant home to: %ANT_HOME%
ant -version
hybris/bin/platform/resources/ant/antmacros.xml:123: java.lang.UnsupportedClassVersionError: de/hybris/ant/taskdefs/DbDriverValidator : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method)
Even though a "java -version" gave me back version 8, ant is still using $JAVA_HOME variable.
So you have to change it into the script. My suggestion is that you adapt the setantenv.bat script with the JAVA_HOME directly
@echo off
set ANT_OPTS=-Xmx512m -Dfile.encoding=UTF-8
set ANT_HOME=%~dp0apache-ant-1.9.1
set JAVA_HOME=C:/Program Files/Java/jdk1.8.0_101
set PATH=%ANT_HOME%\bin;%PATH%
rem deleting CLASSPATH as a workaround for PLA-8702
set CLASSPATH=
echo Setting ant home to: %ANT_HOME%
ant -version
Comments