I didn't see a formal request for this here, so I'm filing one. The internets are filled with years of Q&As about the following message: Unable to locate tools.jar. Expected to find it in <path>\lib\tools.jar I see grudging acknowledgement within the Ant community that this should be fixed some day, but that day hasn't happened yet. But I hope that day is soon. We are using the DITA Open Toolkit and this message is confusing our users. And our users use a variety of different Windows machines, which is not conducive to suppressing or avoiding the message.
Same here, the ANT build system can be used for more than java compiling so it should complain that it does not have java compilation tools only when they are necessary in the given task.
Hello Chris, Radu, Can one of you add some details on how/when this log message gets printed? I've tried to reproduce this on some of the Ant projects (and Java versions) I have on my *nix setup and haven't seen this message ever logged? Is this specifically on Windows?
Sure! On a machine with a JRE but *not* a JDK, 1. Download the DITA Open Toolkit from https://www.dita-ot.org/download 2. Unarchive it. 3. Run <dita-ot dir>/bin/dita --install # on linux <dita-ot dir>/bin/dita --install.bat # on Windows The "--install" option does not affect anything on your system; it just causes that DITA-OT to rebuild its plugin database. Assuming you have a JRE but not a JDK (and no tools.jar where it might be found), you should see the message.
https://github.com/apache/ant/commit/6c3d7de934fd8a90cb66c81c0d81c1a6b5390168