请教下,这串java代码如何写才不报错

bgImage=null;//背景图片
bgImage=ImageIO.read(new File( imagePath.replaceAll("\\", "/")));//查阅api文档的imageio类中的read()方法

这是报的错
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
String literal is not properly closed by a double-quote

String literal is not properly closed by a double-quote

这个错误:string字串没有以双引号结束