While running every program i am getting this message Picked up _JAVA_OPTIONS: -Xmx256M
on console in eclipse without output.
I already tried related answers but none of them working in my case and I am not using _JAVA_OPTIONS
variable in environment variable.
runtime error:
Picked up _JAVA_OPTIONS: -Xmx256M
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]
If Using Ubuntu 16.04, Check etc/profile there you may find _JAVA_OPTIONS: -Xmx256M set. That's a file where environment variables are set for the whole. I assume you are facing this message for every java application you run. Although there are other ways to set environment variables.
You can use _JAVA_OPTIONS to pass options to any JVM process started on your system. For example, set _JAVA_OPTIONS=-Dsun.java2d.noddraw=true. When a JVM starts, it parses the value of _JAVA_OPTIONS as if the parameters were at the command line of java. You can see the passed parameters via JVisualVM.
If you have a variable in Windows Environment Variables called _JAVA_OPTIONS, just delete it and it should fix the issue.
conf. /etc/environment.
The message "Picked up _JAVA_OPTIONS" implies that the Java runtime has found this setting in your environment variables. The solution depends on which operating system you are running. But assuming it is Windows, there are two possibilities:
The most likely is that it is picking it up from the System or User environment. Try opening and command prompt and typing
echo %_JAVA_OPTIONS%
If you see "-Xmx256M", then that's where it is coming from. Hit the start button and search for "Edit the system environment" variables. On the "Advanced" tab, click the "Environment Variables..." button at the bottom. You'll find the _JAVA_OPTIONS variable in either the System variables or the User variables (or both!). Delete or change to suit.
The other possiblity is that your Java programs are being executed via a script. Look at the shortcuts' properties (or however you start the programs) to see if they are directly referencing a java ".exe" executable, or if they are using a script. Alternatively, in your command prompt type
where java
And check to see if this is a true .exe file or a script. It's possible that the _JAVA_OPTIONS variable is hidden in there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With