Click here to Skip to main content
15,901,426 members

Comments by Patrick Wanjau (Top 8 by date)

Patrick Wanjau 27-Nov-13 8:29am View    
You can check this site for more information on working with URLs in Java and how to catch the exceptions associated with such:
http://docs.oracle.com/javase/tutorial/networking/urls/index.html

Once you're done, you can then decide to mark this is the correct answer.
Patrick Wanjau 27-Nov-13 8:04am View    
They mean the same thing. Error 404 in browser means the page was not found, which means the file was not found, and the browser is made to give you a well formatted response for that error message. However, in Java, you have to catch the error yourself or your code will break. In short, what it means is tht your page was not found both by the browser, and your java code
Patrick Wanjau 27-Nov-13 5:35am View    
Trying using this URL to test whether it's your code, or the destination:

URL url = new URL("http", "docs.oracle.com", "/javase/tutorial/networking/urls/creatingUrls.html");

If you get an error, then the issue is somewhere else in your code, and not the Url. But using the http://www.merchant.com/pg/index.html will not work, because that Url does not have that index file. That's why you're getting the java.io.FileNotFoundException, which is a more specific Exception of the java.io.IOException.
Patrick Wanjau 2-Nov-12 4:49am View    
If you download and install the offline version, it is independent of the chosen browser. When you click download and save the file to a download location, once your download completes, you open the download location and run the application. The application will have no issues. However, if it still has issues, you can right click the application and change its compatibility to Win XP. I have never experienced this problem myself, but if the problem persists, you can always update your computer and run the most recent version. That way it will ensure all your files are upto date, and not broken
Patrick Wanjau 6-Oct-12 14:45pm View    
you're welcome