Jdwp unable to get JNI 1.2 environment, JVM-> getenv () return code =-2 jdwp exit Error

Source: Internet
Author: User

Debugging is complete. If the following content appears on the console:

 Error: Jdwp Unable To Get JNI 1.2Environment, JVM-> getenv () return code =-2JdwpExit error agent_error_no _JNI_ ENV (183): [.../src/share/back/util. C: 820]

Add the following statement at the end of the Code: system. Exit (0) (add system. Exit (0); at the end of the main function );),

Note: you only need to add it in this case and do not need it during the official operation.

Note:

What is the difference between return and system. Exit:

1. Return is the upper layer of the returned program, and system. Exit () is the upper layer of the returned program.

2. Return interrupts the current method. system. Exit () interrupts the entire program. The JVM should be disabled.

From: http://blog.csdn.net/config_man/archive/2010/03/17/5390831.aspx

And http://apps.hi.baidu.com/share/detail/22479756

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.