setting PATH environment variable per project

Hi,

I would like to simply add directories/libraries to the windows PATH variable on a per project basis. I have several dlls that changes with projects, but always in the same directory relative to the project home, and am often working on more than one project at once. Each time I change project currently I must change the PATH variable in system-> advanced-> environment variables.

Surely there is an easier way??

Thx in advance,
Mark

4 comments
Comment actions Permalink

Hard to do that.

Have you tried using java.library.path instead?


0
Comment actions Permalink

Thanks Carlos, I have tried java.library.path, but the dll didn't find dependent libraries for some reason. I might investigate this more though.

My Eclipse using colleagues are enjoying this, as this functionality is apparently simple to achieve using that IDE.

Thanks anyway,
Mark

0
Comment actions Permalink

M> Thanks Carlos, I have tried java.library.path, but the dll didn't
M> find dependent libraries for some reason. I might investigate this
M> more though.

Note that java.library.path doesn't work if set inside the program, it has
to be set at jvm invocation (in the Run panel). Caught this when tried to
use the first time.


0
Comment actions Permalink

Carlos Costa e Silva wrote:

Note that java.library.path doesn't work if set inside the program

One needs to reset caching fields in java.lang.ClassLoader
static private String usr_paths[];
static private String sys_paths[];


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.