NetBeans -Djava.library.path separator differs in Windows and OS X

394 views Asked by At

About

I am having a NetBeans project with source code that includes two .jar files that load platform and architecture dependent native libraries each. The following shows the library structure in a generic way:

lib (NetBeans project root level)
  MyLib
    lib1-osx
    lib1-win
    lib2-osx
    lib2-win-x64
    lib1.jar
    lib2.jar

The paths of the native libraries need to be defined in the -Djava.library.path variable. The VM Options field within the Run property of the project properties looks like this for the generic library structure:

-Djava.library.path=
"./lib/MyLib/lib1-win";
"./lib/MyLib/lib1-osx";
"./lib/MyLib/lib2-win-x64";
"./lib/MyLib/lib2-osx";

Problem

The string above only works for Windows because there the entries of -Djava.library.path are separated with ; while OS X needs :.

Question

Is there something like a placeholder where NetBeans inserts the correct separator for each OS? Otherwise I have to provide two different NetBeans projects what is definitely not what I want.

0

There are 0 answers