It looks more like the imported library issue as stated already. So can you check if ypu have imported the right library and the class path are added in env variables and library is present
Please check thsi thread as well. Not all steps might be applicable but you can see few might help as resolution steps
Let me know if you still face the issue .
And alternately if the code is working from ajava env then once try changing the package and see if its the package issue
Cheers