When running the program is suddenly the following exception occurs
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [util.c:840]
The reason:
1.JDK1.6.1
2. There is an error in the last debugging code, which causes the process not to terminate and take up the Console output, and such error occurs when starting debugging later.
Solutions:
At the end of the program, the main() function adds: System.exit(0);
System.exit(0); will cause the program to be terminated immediately, and if there are threads in the program that are still executing tasks, subsequent tasks will not be able to continue.
Read More:
- [Solved] IDEA Debug Error: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
- How to Solve FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE
- OTA Pack Compile Error: ExternalError: Failed to run signapk.jar: return code 1:Error: A JNI error has occurred
- The principle and return value of get() function in C language
- Spring boot uses thread pool to realize asynchronous processing without return and asynchronous processing with return
- Java error: unable to find or load main class (package name in source file)
- [Solved] JAVA Error: Error:A JNI error has occurred,please check your installation and try again
- How to Solve JAVA Error: error: A JNI error has occureed
- JNI ERROR (2354): JNI connection is NULL [How to Solve]
- [PROJECT] itdage java to get the weather and send text messages
- [Solved] Docker Start Error: System.InvalidOperationException Failed to set version to docker-desktop exit code
- JAVA Error: Error attempting to get column ‘XXX’ from result set. Cause java.sql.
- Nacos boot error, unable to find Java_HOME [How to Solve]
- [Solved] Gurobi–Error code: 10005. Unable to retrieve attribute solved ‘Pi‘
- How to get the current time in java time string
- Elasticsearch Startup Error: unable to install syscall filter: java.lang.UnsupportedOperationException: seccomp
- Java.sql.sqlexception: unable to read more data from socket
- [Solved] Error attempting to get column ‘xxxx_time‘ from result set. Cause: java.sql.SQLFeatureNotSupportedEx
- [Solved] Error: A JNI error has occurred, please check your installation and try again Exception in thread
- [Solved] Hongmeng compiles error: Unable to find the java component with apiVersion 4.