Many many moons ago I taught myself to program (Z80 Assembler) from a book whilst building my computer (and I really mean building - this was in the days one bought a motherboard, a load of components and a soldering iron!!). I found that when I came to actually write code I didn't know as much as I thought I did, but having already read the book I was able to quickly solve my problems by diving back into the book at the appropriate places.
So to answer your question I don't think you can completely teach yourself how to program without having a computer to practice coding on, however it will give a good background and
you should be able to get up and running fairly quickly when you do get access to a computer.
So my advice is to keep on reading. If you don't have access to many books there are some good online references such as
Sun's Java tutorialand the excellent book
Thinking in Java by Bruce Eckel