Okay, so now I've tried your methon and I get:
Code:
java.lang.UnsatisfiedLinkError: no opencv_java310 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at org.usfirst.frc.team2415.robot.Robot.<clinit>(Robot.java:13)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:204)
with this as code (added the try catch after the first time it failed to get error printed neatly):
Code:
import org.opencv.core.Core;
import edu.wpi.first.wpilibj.SampleRobot;
public class Robot extends SampleRobot {
static{
try{
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}catch(UnsatisfiedLinkError e){
e.printStackTrace();
}
}
public void robotInit() {}
public void autonomous() {}
public void operatorControl() {}
public void test() {}
}
I tried putting the .so file for opencv in the same directory as the FRCUserProgram on the roboRio, and it still returns this error.