Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

Java, the OLPC, and community responsibility

The "One Laptop Per Child" project has a great device ready to ship, but there's no Java on there. Let's think about working together to put Java on OLPC!
Replies: 0 - Pages: 1  
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

RCP Product VM Argument Variables

At 2:23 PM on Aug 7, 2008, Burt wrote:

Hi All,

I'm trying to figure out how to use variables specified in VM Arguments
for an exported RCP product.


In the project's run configuration within the Eclipse IDE I use the VM
Argument:
-Djava.util.logging.config.file=${workspace_loc:com.project.config}/config/logging.properties
This works as I need it to while running the project from the Eclipse IDE.
I verified that the custom configuration file I wrote is being read by
java.util.logging.


However, when I specify this VM Argument verbatim inside the RCP product
configuration file (.product file) for my project and export it, the
variable "workspace_loc" is not expanded out as I expected it to (and is
not read by java.util.logging).

I inserted some debugging println statements to verify this. When running
the application from the Eclipse IDE, printing the
"java.util.logging.config.file" gives something like
"F:/workspaces/workspaceA/com.project.config/config/logging.properties".

When running the exported product, printing the
"java.util.logging.config.file" gives
"${workspace_loc:com.project.config}/config/logging.properties".


Basically I don't want to hard code the absolute path into the exported
product's configuration (.ini file). I would rather use a variable that
can automatically expand out to the product's installation directory (or
perhaps the specific plugin containing the logging.properties file) within
the VM argument value. Is there a way to do this?

Thanks for any help!


thread.rss_message