The problem occurs because your JRE (Java Runtime Enviroment) and your JDK (Java Development Kit) are not working together correctly. Short answer: Right-click on the class that contains the main method. A JNI error has occurred, please check your installation and try again Learn more about java at. Error: A JNI error has occurred, please check your installation and try. JDK-8153833 - NoClassDefFoundError leads to message "A JNI error has occurred". The only known cause of this error is when the application is being executed by a JRE (Java Runtime Environment) that is not configured in.