Setting JAVA_HOME when running Ant from Java

后端 未结 5 467
生来不讨喜
生来不讨喜 2021-01-03 04:27

The reason is long and boring, but I need to run an Ant script to compile Java 1.5 code from a Java 1.4 app. I keep getting this error, though:

BUILD FAILED         


        
5条回答
  •  被撕碎了的回忆
    2021-01-03 05:17

    Have you set environment variables JAVA_HOME and ANT_HOME properly? If you are setting via code it should work though.

    Also check if your %JAVA_HOME%\bin directory %ANT_HOME%\bin should be in the environment variable 'path'.

    Your problem seems to be with the %JAVA_HOME%\bin not being present in the envt. variable path though.

提交回复
热议问题