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