This gives them clues about what is the most pressing thing to write about next. Any time a new Java-relevant term appears, usually within hours, there is a definition for it and a URL reference in the glossary. You can use the analogs from the printed world. Pay per view. Via advertising of products likely to be of interest to readers of the online book.
Publishers provide artists to produce illustrations.
Publishers periodically take snapshots of the ongoing work for mass run paper versions of works that are proving to be popular. The customer gets to specify things like binding, size of type, monochrome or colour, resolution, paper quality, and which chapters are required. The custom made books are then shipped by snail mail or FedEx. You don't have to be omniscient. You invest almost nothing until a work has proved itself popular.