Community
Participate
Working Groups
When I debug code, sometimes on resume, I get this error in the console. 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] I don't have reliable steps to reproduce.
*** Bug 163129 has been marked as a duplicate of this bug. ***
Olivier, have you seen this problem in 3.3 lately? Without steps to reproduce there is nothing we can do.
I didn't get it lately, but when I got it it was repeatable. Ok to close for now and I'll reopen if I get it again.
Thanks, marking as works for me.
Just seen in 3.3M7, fresh workspace. Try this: public class Pqr { public static void main(String[] args) { new Vwx(5).doSomething(5); } } public class Stu { public Stu(int x) { x++; } public void doSomething(int x) { x++; // breakpoint } } 1. Use the two source files above and set the breakpoint as shown. 2. Launch Pqr in debug mode. 3. When the breakpoint is hit rename class Stu to Vwx. 4. The new hot code replace dialogue appears - choose Restart. 5. Breakpoint hits again. Resume execution. (During this I manually accept firewall alerts for the VMs to make/accept local connections). About one in four attempts results in the following: 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] It seems slightly more likely to occur if you pause a few seconds between each step. Eclipse and runtime VM info: java.version=1.6.0 java.vm.info=mixed mode java.vm.name=Java HotSpot(TM) Client VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=Sun Microsystems Inc. java.vm.version=1.6.0-b105 (which I know isn't an officially supported target VM) Project compiler, class and source are in 6.0 mode.
Also seeing in: - Compiler compliance 5.0, runtime JVM Sun 1.6.0-b105 (Win XP) Not yet seen in: - Compiler compliance 5.0, runtime JVM Sun 1.5.0.08 - Compiler compliance 5.0, runtime JVM jrockit-R26.4.0-jre1.5.0_06 (although this leaves open an editor corresponding to the renamed source file, which causes problems if attempting to rename back). Seems to be a Sun 1.6 JVM bug. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476706
*** Bug 195475 has been marked as a duplicate of this bug. ***