I was looking for this the other day; and didn't find it - and today I stumble on it almost by accident.
If you want to use Java to access a URL that requires a username/password combo; this page will tell you how to do it:
Java Tip 46: Use Java 1.2's Authenticator class
Although I may use this other tip:
Java Tip 47: URL authentication revisited
because it looks like it might be easier for me to wrap my head around and insert the username and password combo right in the code. There are a bunch of user/pass combos that I need to put in there; I know it's not very secure but usability would suffer and the way I want to use this, security won't be an issue anyways.