Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on

4.4k Views Asked by At

Whenever I execute java code on intellij on kali, or type java --version in command line I get this message

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true.

I googled it and found this link that is exactly the same situation as me, but what I understand is that it's an information not error and I can unset _JAVA_OPTIONS environmental variable. What I'm asking for is that deleting this environmental variable will not cause any harm?

I read in the above link that If you remove that variable, information will be gone. I didn't understand is that mean any damage or he just said that the message will gone!

And finally how to delete or unset this _JAVA_OPTIONS variable?

Update :

When I unset this variable by these commands

_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"

unset _JAVA_OPTIONS

alias java='java "$_SILENT_JAVA_OPTIONS"'

-referenced from this link, the second answer- the message is still appear but after the output of the java program instead of before the output as it was!

1

There are 1 best solutions below

0
gulagi On

this option is set in the 95kali-themes.conf file located in the /etc/environment.d directory and this option is related to the smoothing of the fonts on the java awt and java swing applications.

so these are harmless and actually might be useful for some of the applications with java based GUIs.

if you really want to get rid of the message , then just comment out the line in 95kali-themes.conf file or use the unset command to unset that environment variable for the whole system

if these are not found in locations , then look for the /etc/profile.d and /etc/environment.d directory.