With Java strings, the "\" is an escape character. When combined with the next character, it has special meaning. In your case, you actually want the backslash...
File myFile = new File("C:\\Program Files\\Java\\jdk1.5.0\\bin");
The problem is with the single backslash characters used in the path you have specified. You will have to 'escape' the single backslash 'special character' with another backslash. The below line should work...
File myFile = new File("C:\\Program Files\\Java\\jdk1.5.0\\bin");
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
Gift giving made easy with the permaculture playing cards