Multiple directories in -Djava.library.path

笑着哭i 提交于 2019-12-06 16:36:54

问题


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.


回答1:


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



回答2:


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


来源:https://stackoverflow.com/questions/30176215/multiple-directories-in-djava-library-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!