Accepted answer

looks like which has low priority and is still not fixed. definitely a mustang bug but no clear explanation (seems to occur pretty randomly according to the bug reporters on top of that).


@everyone i'm facing this problem using the image api reading and writing files over the network, when i run the program working with local files this doesn't happen. after verifiying my results i confirmed that it really doesn't do any harm (at least on my debugging). now that i'm reading this post i stopped looking into it.


i have noticed this occurs when i am using a workspace stored on my usb drive and sometimes on my work's network. it is not a major issue and doesnt seem to have any effect on the execution of any of my programs. i tested @vasile surdu's solution of addingsystem.exit(0); to the end of the main method and it works. another solution is to restart eclipse which works for me most of the time.


happens on something as simple as this tutorial

//trim spaces
string s2 = "welcome!";
int len1 = s2.length();
string s3 = s2.trim();

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]


it's apparently a jvm bug. it's harmless and unpredictable.


just add system.exit(0); to the end of your main method.

that's all you have to do.

Related Query

More Query from same tag