I have been today working on this Issue and have created a code that works for any CRC, you will find many different CRCs in the crc.h file, some of them tested and working. The code is done in C, so you should not have many problems to use it in Java.
To be able to use any kind of CRC, the lookup table is generated dynamically, you can put the A_crcLookupTable array in the watch window and copy the values from the array if you want to include it as a constant.
I hope it helps you: https://sourceforge.net/projects/crccalculator/files/CRC/?