A file URL has the syntax, file:
PathName
,
where PathName
is the relative or absolute pathname of a
file that is available on the Classpath. The provided
PathName
is parsed by Java's built-in file
URL handler. Hence, the
PathName
syntax is subject to the usual conventions
of a Java pathname: in particular, on Windows, each backslash must either be escaped
by another backslash or replaced by a forward slash.
For example, consider the pathname,
C:\Projects\camel-bundle\target\foo-1.0-SNAPSHOT.jar
, on Windows.
The following example shows the correct alternatives for the
file URL on Windows:
file:C:/Projects/camel-bundle/target/foo-1.0-SNAPSHOT.jar file:C:\\Projects\\camel-bundle\\target\\foo-1.0-SNAPSHOT.jar
The following example shows some incorrect alternatives for the file URL on Windows:
file:C:\Projects\camel-bundle\target\foo-1.0-SNAPSHOT.jar // WRONG! file://C:/Projects/camel-bundle/target/foo-1.0-SNAPSHOT.jar // WRONG! file://C:\\Projects\\camel-bundle\\target\\foo-1.0-SNAPSHOT.jar // WRONG!