Setting JAVA_HOME when running Ant from Java

后端 未结 5 499
生来不讨喜
生来不讨喜 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

    javac option is available in tools.jar. In eclipse, even if your JRE HOME points to a jdk, all the system libraries point to JDK_HOME\jre\lib. There is no tools.jar. You can add tools.jar as an external Jar file. This should solve your issue

提交回复
热议问题