Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
它与添加 .jar 文件的过程相同吗?
不,您需要在您的方法中加载此 .dylib。System.load(System.getProperty("user.dir")+"/opencvlibs/libopencv_java310.dylib"); 假设 libopencv_java310.dylib 已经添加了项目目录。
或者你可以保留一些路径,即/opt。将以下代码放入您的方法 System.load("/opt/opencvlibs/libopencv_java310.dylib");