Bug 63577 - Do not look for tools.jar when a JRE is used (instead of a JDK)
Summary: Do not look for tools.jar when a JRE is used (instead of a JDK)
Alias: None
Product: Ant
Classification: Unclassified
Component: Wrapper scripts (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: 1.10.9
Assignee: Ant Notifications List
Depends on:
Reported: 2019-07-21 22:11 UTC by Chris Papademetrious
Modified: 2020-08-23 10:40 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Papademetrious 2019-07-21 22:11:11 UTC
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.
Comment 1 Radu Coravu 2019-07-22 04:19:34 UTC
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.
Comment 2 Jaikiran Pai 2019-07-29 12:33:41 UTC
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?
Comment 3 Chris Papademetrious 2019-07-29 18:29:54 UTC
Sure! On a machine with a JRE but *not* a JDK,

1. Download the DITA Open Toolkit from


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.