Jakarta has been experiencing severe land subsidence over the last few decades. A questionnaire survey of local inhabitants revealed that seawater is already overtopping coastal dykes and flooding a vulnerable community along Jakarta's waterfront. The present study projects coastal floods around Jakarta until the year 2050 to understand the long term effectiveness of proposed dykes under continuing rapid land subsidence scenarios. This is done through a hydrodynamic model that considers land subsidence, sea-level rise, and tides. The analysis confirms that, if high enough, coastal dykes will help to prevent flooding, though their effectiveness will eventually disappear as land subsidence continues. For example, a 3-m dyke, which is expected to be sufficiently high to cope with present-day conditions, could completely lose its ability to stop floods by the year 2040. Moreover, higher dykes can also bring about other problems, because if they are overtopped, they actually prolong flooding, essentially trapping a higher volume of water inland. On the other hand, a small 1-m dyke can be expected to stop coastal floods if land subsidence can be stopped. This study demonstrates that actions to stop land subsidence would be the most effective countermeasure to mitigate coastal floods from the middle of the 21st century onwards, emphasizing the need to prioritize such actions among the range of countermeasures being proposed for Jakarta.