Multiple directories in -Djava.library.path
Asked Answered
C

2

40

How can I point to two differents java.library.path in eclipse project - run configurations? I need these two libraries:

-Djava.library.path=/opt/hdf-java/build/bin
-Djava.library.path=/opt/opencv-2.4.10/build/lib

Regards.

Cantoris answered 11/5, 2015 at 19:37 Comment(0)
R
55

On Linux, use colon : as separator (as you will do with the classpath option) as in:

-Djava.library.path=/opt/hdf-java/build/bin:/opt/opencv-2.4.10/build/lib
Ripsaw answered 11/5, 2015 at 19:46 Comment(1)
On windows, use semicolon ;Instrumentation
P
17

Use the platform's File.pathSeparator, i.e. ; on Windows and : on *nix, to separate directories, just like you would separate the directories in the classpath.

e.g. Windows:

-Djava.library.path=C:/dir1;C:/dir2

or *nix:

-Djava.library.path=/dir1:/dir2
Plateau answered 16/10, 2018 at 3:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.