If anyone else comes across this Here's the fix
DoublePointer maxVal = new DoublePointer(1); DoublePointer minVal = new DoublePointer(1); All you had to do was set the size in the constructor.
DoublePointer maxVal = new DoublePointer(1); DoublePointer minVal = new DoublePointer(1);
All you had to do was set the size in the constructor.