path seperator

Iam using File.separator to form a path which then reads the file at that path from a jar.It is failing to read the file from the jar.My application is platform independent .BUt when i hardcode / instead of File.separator it runs fine.Iam running my code using java webstart

PopupMenu.xml is placed in a jar and is included in the path

Following code runs fine

String eccxmlFilePath= "config/xml/eccpopupmenu/PopupMenu.xml";

URL url = Ciscowork.class.getClassLoader().getResource(

eccxmlFilePath);

url is coming fine

Following code fails to fetch the url

String separator = File.separator;

String eccxmlFilePath = "config" + separator + "xml" + separator +

"eccpopupmenu" + separator + "PopupMenu.xml";

URL url = Ciscowork .class.getClassLoader().getResource(

eccxmlFilePath);

I donot want to hardcode the seperator.Please suggest why the above is happening

[943 byte] By [sisl_javaa] at [2007-10-3 9:12:10]
# 1
> Please suggest why the above is happening Did you actually print the value of each string to see if it was the same?
camickra at 2007-7-15 4:24:25 > top of Java-index,Java Essentials,Java Programming...