7

In java program, When I try to compile some code it creates an error I get this message:

Picked up _JAVA_OPTIONS: -Xmx512M

what type of error is this the page Suppressing the "Picked up _JAVA_OPTIONS" message
cannot solve problem ,how to change system variable in windows 7 ??

Community
  • 1
  • 1
divan
  • 87
  • 1
  • 1
  • 7
  • If you have a variable in Windows Environment Variables called _JAVA_OPTIONS, just delete it and it should fix the issue. – sauumum Jul 06 '16 at 15:39
  • Why this variable will be in the environment variable? Is this set by Java? – S.P Singh May 27 '21 at 12:03
  • No. It was set by something else. Users / applications should not use this option. The warning printed because this mechanism can lead to security-related problems. (Unfortunately, they can't get rid of it entirely because that would break things.) – Stephen C May 06 '22 at 03:18

4 Answers4

11

Go to my computer and right click on top of that and click on properties, a new window will open like below.

enter image description here

then click on advanced system setting

enter image description here

then click on environment variable and delete _JAVA_OPTIONS from user variable and then try again.

seenukarthi
  • 8,241
  • 10
  • 47
  • 68
SUBHASIS MONDAL
  • 705
  • 9
  • 20
2

Part of my original answer was truncated, so here is the edited answer:

From the Start Buttong, search for System, then launch "System" from your search results. In the new window, select Advanced System Settings. A new window will open, select the Advanced tab, then click on the Environment button. In this new window, select _Java_Options, in the user variables and then click on Delete. If the lower section, System Variables, is greyed out and you cannot delete _Java_Options there, you will need to log on as an administrator, or attempt to run the "System" command as Administrator.

Jonathan
  • 21
  • 3
2

You have to delete your environment variable named "_JAVA_OPTIONS" going to system, advance settings. Save, close your project and restart.

NonnoAndre
  • 51
  • 2
-1

Please check your JDK version. Maybe you need to change or upgrade your JDK version.

Tohid Makari
  • 1,700
  • 3
  • 15
  • 29