I think the -cp option was having java look in the wrong place.
Change to the classes folder and enter this command:
The package name gives the java command the path to where the class file is.
Using -cp "com/mycompany/helloworld" com/mycompany/helloworld/HelloWorld
has java looking in the helloworld folder for the package/path ie com/mycompany/helloworld/HelloWorld
The OpenCV native library files (e.g. opencv_javaXXX.dll, libopencv_javaXXX.so) are not in the PATH.
Make sure the native library (dll or so) is in your PATH or in the working directory of your program
Have you checked that any dll are in the correct locations?
Try debugging the code by adding some print statements that print out the values of the variables before and after the statement where you think the problem is.
Look at the value of currSum as the code executes.
This program design has always confused me. Should anyone outside of the class receiving the contents of the record read from the file know the contents of the record? In other words, should the line that was read from the file be passed directly to the class's constructor and have the constructor do the parsing. That would allow the class to create records to be written to a file since it knows the contents and would allow changes to be made in the record layout without affecting any exterior code.
Is there code that calls the correct set... method? Or are there missing assignment statements?
Or is the correct code not being executed?
Can you post a small, complete program that shows what you are trying to do?
Perhaps your existing code only needs some small changes to make it work. It is hard to say without seeing the code.