ERROR:JDWP unable to get JNI 1.2 environment, JVM->GETENV () Return code = 2

Source: Internet
Author: User

ERROR:JDWP unable to get JNI 1.2 environment, JVM->GETENV () Return code = 2

This problem occurs today when testing a piece of code with the main function;


Refer to the following article to resolve the issue:

http://blog.csdn.net/zxl0016/article/details/7327125

http://blog.csdn.net/mmllkkjj/article/details/6149043

Other methods are inconvenient, system.exit (0); it's easy, just try it.

But as the reference article says, System.exit (0) will cause the program to be terminated immediately, and if the thread is still performing the task, subsequent tasks cannot continue.

Later, this problem does not occur, after repeated testing, the root cause of this error is that the last time the debugging code has an error, resulting in the process is not terminated, the console output is occupied, so after the start of debugging when the error occurs.

ERROR:JDWP unable to get JNI 1.2 environment, JVM->GETENV () Return code = 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.