Search code examples
javajava-native-interface

JNI error has occured


I tried running this program as a test and I received the error, "A JNI error has occurred, please check your installation and try again," followed by "A Java Exception has occurred". Any thoughts on how to fix this?

package java;

public class ExpressionsStatementsBlocks {
    public static void main(String[] args) {
        float num;
        num = 5/2;
        System.out.println(num);
    }
}

Solution

  • You can't use "java" as a package name. Try to use another name like "jaba".