ERROR: JDWP Unable to get JNI 1.2 environment的解决方法

Posted 飞鱼君

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ERROR: JDWP Unable to get JNI 1.2 environment的解决方法相关的知识,希望对你有一定的参考价值。

当执行如下代码时:

        //从控制台获取输入
        InputStream is = System.in;
        Scanner scanner = new Scanner(is);
        System.out.println("请输入:");
        System.out.println(scanner.nextLine());

有时会发生如下错误:

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

查看了一些资料:

比较简洁的解决方法是在上述代码结尾加:

System.exit(0);

程序则可正常推出。

 

以上是关于ERROR: JDWP Unable to get JNI 1.2 environment的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

...cURL error 60: SSL certificate problem: unable to get local issuer certificate...

cURL error 60: SSL certificate problem: unable to get local issuer certifica 解决

cURL error 60: SSL certificate problem: unable to get local issuer certificate(转)亲测

uwsgi部署相关问题Fatal Python error: Py_Initialize: Unable to get the locale encoding

cURL error 60: SSL certificate problem: unable to get local issuer certifica

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx