ERROR: JDWP Unable to get JNI 1.2 environment

后端 未结 6 650
野的像风
野的像风 2020-11-29 00:45

I get this error after debugging in Eclipse. The debug is successful though.

ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2         


        
6条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 01:34

    Happens on something as simple as this tutorial

    //trim spaces
    String s2 = "Welcome!";
    int len1 = s2.length();
    System.out.println(len1);
    String s3 = s2.trim();
    System.out.println(s3.length());
    

    Happens if run program too fast multiple times so something to do with system performance?

    ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
    JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:838]
    

提交回复
热议问题