Even though the previous comments do mention where this question rather belongs, I just think back of the time when I had no internet (I'm not that old, but my family didn't have internet back when I started to get into computers).
The best way for me was to bring along a few books that I might be interested in and starting some long-term project on my own that would require me to read up on things, because I didn't have the knowledge right away. So I just thought up some project - for example an item management system for an online game - and then I dug my way through all the stuff. Since I already used Java back then, I wanted to use that as a backend solution - and possibly something that is available anywhere as a frontend solution. I programmed webservices in the end along with some frontend to use them.
Another option would be to additionally go into something more theoretical - such as design patterns. It all depends on your way of learning things though. If you're more the practical guy, that likes to start doing something and learn along the way - you'd probably be better off just bringing some reference books along (either PDF or printed copies).
If you're more of the guy who likes to read stuff up before trying it out, you might like some tutorial-like books, which guide you step by step through something - extending most likely one single project as you progress through the book. This is certainly good if you're learning something new and have the patience to finish the chapters.
Oh.. and I'm not advertising or anything, but I believe that Visual Studio and C# or any other language there would be a good pick, because the MSDN Knowledge is quite big, yet accessible offline. So you don't have to worry about references (javadocs or api help). Of course you can download Java-related help for offline-usage as well, but I think Visual Studio with its MSDN help system is a bit easier and also contains materials that you wouldn't call reference, but rather some aiding and informative articles.
The biggest problem you will have is that you're on your own. If your books or offline materials don't cover the question (or the errors) you have or get then it's up to you to find a solution. While finding a solution online might take only a couple of minutes (e.g. because the problem is well-known), it might take you hours or days to find it yourself - or you might not make it at all.
Those are my thoughts and I beg to excuse the horribly long post.
P.s.: I kept my answer not as precise on purpose, because I think it's up to you to chose what language or environment you want. I just thought I'd give you my thoughts on dealing with programming while being offline.