|
Re: Eclipse RCP product - is there anyway to update the PATH during launch [message #875722 is a reply to message #875518] |
Wed, 23 May 2012 08:25 |
|
There may be at least two approaches:
1) Use Bundle-ClassPath
Plug-in that needs to see bin/ folder can make use of MANIFEST.MF header
Bundle-ClassPath. Example:
Bundle-ClassPath: .,
bin/
other-folder/,
somelibrary.jar
Easier way to set it up is on "Classpath" section on Runtime tab of
Plug-in Manifest Editor.
2) Use VM arguments of product definition
Add standard -cp argument to "VM Arguments" section in Launching tab of
Product Configuration Editor.
I've never used this and probably it will replace global JVM
classpath... You have to prove it yourself.
Cheers
Libor
On 05/23/2012 12:23 AM, ALOK MANJREKAR wrote:
> Hello,
>
> I am working on an eclipse RCP product on windows which internally uses
> some native binaries (dlls) located in a folder called "bin" which would
> be available as a part of the product. I need to make sure that the
> folder "bin" is present in the PATH when the product.exe file is
> executed. Is there a clean way to make sure that the folder "bin" is
> added to PATH when the eclipse RCP product is launched? I don't want to
> write any script or batch file that updates the PATH and then calls the
> product.exe. I also don't want to update the environment variable
> through the windows UI or command prompt.
>
> I know that when we try to run my product from the eclipse IDE
> environment, there is an option in the run-configuration, wherein one
> can configure Environment variables on the Environment tab. I can append
> the "bin" folder to the PATH by creating a new environment variable
> called "Path" whose value is C:\EclipseRCPProduct\bin;${env_var:PATH}.
>
> However - I would like to do the same when I run my product directly
> from the Product.exe which is generated. Does anyone have any idea
> regarding this?
>
> Also - if anyone has any idea regarding the eclipse code which processes
> the information specified on the Environment tab of the run
> configuration, it would be great. I could try playing around with the
> code to see if I could get it to work when the product is launched from
> outside eclipse IDE - via the generated RCP product.exe
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02824 seconds