In a bndrun file, how to pass properties in -runvm which have spaces?

237 Views Asked by At

In a .bndrun file I have:

-runvm: -Djava.util.logging.config.file=${workspace}/com.myproject/conf/logging.properties

When I run the run descriptor, the console shows:

Error: Could not find or load main class and

That's because of the following generated command line:

"C:\Program Files\Java\jre7\bin\javaw.exe" -Djava.util.logging.config.file=C:\Documents and Settings\Dan\eclipse-workspaces\workspace/com.myproject/conf/logging.properties

The space is obviously upsetting it. Normally quote marks are the solution to this. But if I add them, they seem to be stripped out:

-runvm: -Djava.util.logging.config.file="${workspace}/com.myproject/conf/logging.properties"
2

There are 2 best solutions below

0
On

This is likely a bug in bnd, might be because the backslashes of windows. In this case, since you're relative to the workspace, you might want to address the properties relative?

Can you file a bug?

0
On

You can try to use a macro to get rid of the backslashes, till the "bug" is fixed.

  # replace backslash with slash
  workspace.unix = ${replace;${workspace};(\\\\);/}