Hello, I have the following code which uses wget:

Code:
Process p;
					Process r;
					p = Runtime
							.getRuntime()
							.exec("wget -q -N https://www.supportspace.com:443/support/j_spring_security_check_online_account --post-data=\"j_username="
									+ txtTestEmail.getText()
									+ "&j_password="
									+ passwordField.getText()
									+ "&rememberMe=1\" --no-check-certificate --cookies=on --keep-session-cookies --save-cookies=cookie1.txt");
					p.waitFor();
					r = Runtime
							.getRuntime()
							.exec("wget -q -N --referer=http://www.supportspace.com/support.expert-account.s2 --cookies=on --load-cookies=cookie1.txt --keep-session-cookies --save-cookies=cookie1.txt http://www.supportspace.com/support/sessionHistory.s2");
					r.waitFor();

Basically, the first part posts the username and password to that website and saves the cookie as cookie1.txt. Then the second part goes to the page that I actually want to retrieve which uses that cookie that was made to log into the website and download it and save it, and then the rest of my code parses that source code. But I want to convert this to be completely in java, because as you can imagine this currently is designed for windows, and I want it to work cross-platform. Any way to post login data to a website, keep the cookie, and then use that cookie to download a page from that website?

Thanks guys!