Java mouse-deer are primarily herbivores, although in captivity they have been observed to eat insects as well as foliage. Their diet consists primarily of that which they find on the ground in the dense vegetation they inhabit, and they prefer the plants of the faster-growing gap species over the closed forest understory species, likely due to the increased richness of secondary protective compounds which the gap species provide. They are often classified as folivores, eating primarily leaves, shrubs, shoots, buds, and fungi, in addition to fruits which have fallen from trees. The fruits which Java mouse-deer commonly consume range from , while the seeds range from .