9

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]
Balwinder Singh
  • 2,272
  • 5
  • 23
  • 34
mishra88
  • 149
  • 1
  • 3
  • 9

3 Answers3

6

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.

Peter Rogers
  • 71
  • 1
  • 4
0

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.
This link ubuntu-environmentvariables describes them, you can check them and try to see where have you set this environment variable. It will exactly of this sort Picked up _JAVA_OPTIONS: -Xmx256M.
Hope it helps. I faced the same issue and detected in the profile document mentioned above.

jiraiya
  • 28
  • 9
0

Go to System Environment Variables check for JAVA_OPTIONS under variables delete or update based on your requirement i got the value as 1024 i modified to 16384 -Xms1024m -Xmx16384m

Sahitya M
  • 11
  • 4