PDA

View Full Version : Eclipse Error when compiling Java programs



harmonizedchaos
March 29th, 2007, 07:36 PM
what does this mean and what do I do to fix it? Any and all ideas are much appreciated!

"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:820]"

Thanks in advance!

smokey edgy
March 29th, 2007, 08:07 PM
Are you using Sun's JDK or the stock GNU Java compiler (gcj) that comes with Ubuntu? If you have the GNU Java compiler, I would suggest using Sun's JDK. Personally, I've never had much luck with GCJ; then again I haven't spent much trying to get it going. :)

smokey edgy
March 29th, 2007, 08:09 PM
bah, sorry. Sent the message twice.

harmonizedchaos
March 29th, 2007, 10:51 PM
nope, am using Sun's JDK. Although if I just ignore the error, it seems like the program will run fine..the error doesn't really affect it I guess. :)

smokey edgy
March 30th, 2007, 02:16 AM
Oh so the error shows up in the terminal window while your working in the IDE?

Nebulus
April 12th, 2007, 02:11 PM
what does this mean and what do I do to fix it? Any and all ideas are much appreciated!

"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:820]"

Thanks in advance!

This is known bug in Java 1.6 and it only appears when debugging.

More info on Suns site:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476706