OpenCV dll hijacking

How to avoid dll hijacking when open source opencv is used on windows?

is this related to java or android?

Yes, this is related to java.