I try to build JAR with a Class-Path
element in the MANIFEST.MF
. I get the elements of the class path from an outside source (Maven in my case). Since the paths are absolute and beyond my control, they can contain weird characters like spaces.
Since spaces are used to separate items in the class path, this path doesn't work:
Class-Path: C:\User\Some Odd Name\project\target\project-1.0.0.jar
How can I escape / encode odd characters / whitespace in items of the classpath in the JAR Manifest?