CLR library dependency path, Java host <p>I'm writing a sort of device interface in C# and Java. The C# interfaces with the native device libraries and runs a long living worker thread that polls for data. It does some processing and stores its data in an internal queue. </p> <p>The Java part starts the worker thread and polls its internal queue. The thread is separate from the main JVM thread.</p> <p>The trouble is that when I load the C# library, it cannot find the device library dependency. It tries to look in the system dirs and the JVM dir (The Bridge.LoadAndRegisterAssemblyFrom method simply calls the system assembly loader). I resorted the manually opening and loading that dependency from the Java host.</p> <p>Is there a way to set the CLR library path. I'm not too experienced with .Net, so there might be a generic way, not just for jni4net.</p>