Japan had a period where no outsides where allowed in, except the dutch. And while that's interesting in itself, I only now realized the incredible distance between them by boat. The dutch sailors would have to go around the entierety of africa just to reach the western edge of asia.
You have to however remember that the Dutch had colonial outposts along the Gold Coast (modern day Ghana), Cape Town (South Africa), Mauritius and the Dutch East Indies (Indonesia), with temporary presences in Sri Lanka and Taiwan. There were more than enough places to replenish supplies along the way.
As for the travel time, that depended. Prior to 1617 a journey from the Netherlands to Batavia would have taken around a year, primarily due to the still winds of the Indian Ocean, which were only then crossed following the Monsoon winds. Hendrik Brouwer, a Dutch captain, was however tasked in 1613 to discover a faster route, which he did by following the 38th South Parallel (colloquially, nearly part of the 'Roaring Forties' fast air currents). This route, adopted officially in 1617, cut travel times down to about 5-6 months (and also, indirectly, lead to the discovery of Western Australia). A journey from Batavia to Deshima would have taken around 1 month, putting the total travel time at around 6-7 months. That however doesn't tell the entire story since, generally, it was not the same ship nor crew that made the journey from Amsterdam to Batavia as Batavia to Deshima. If however, you were a newly delegated 'Opperhoofd' from Amsterdam, it would take you roughly 6-7 months to travel from 'door to door', barring any self imposed layovers, which could certainly be quite long.