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");
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
a bit of art, as a gift, the permaculture playing cards