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
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]