Although constraint programming has attracted much attention in logic programming, nowadays the importance to integrate constraints with imperative programming is widely acknowledged. In particular, in artificial intelligence domains, the benefits deriving from merging constraint-based programming with object-oriented paradigms seem to be still more attractive because of the lack of 'pure' AI languages in supporting structured representations. This work presents the extension of the Java language towards finite domain constraint programming. This extension has been possible thanks to a high-level approach to low-level resource management: the sleeper mechanism. As practical results, this paper shows how Java programmers can develop meaningful applications in which finite domain constraints have been extensively used, as in the design of visual, interactive, user-interface environments in a client-server architecture.