2

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!

zyydoosh
  • 387
  • 2
  • 14
  • What OS are you using? – MarsAtomic Mar 16 '20 at 00:14
  • @MarsAtomic kali-linux – zyydoosh Mar 16 '20 at 00:15
  • 2
    Edit your .bashrc and remove _JAVA_OPTIONS. All that variable does is feed the value(s) to the Java exe as command line args, but it's not typically used. In fact, it's undocumented, meaning no one should be using it, so deleting it is very likely to be safe. I'd be curious to see how that env variable was set in the first place -- probably some Oracle specific tool or application. – MarsAtomic Mar 16 '20 at 00:26
  • 1
    OK, so... right after I wrote that, I found [this](https://wiki.archlinux.org/index.php/Java_Runtime_Environment_fonts). Apparently, you caught that setting by using an Oracle JDK release. That font setting variable is there to turn on anti-aliasing. The worst thing that can happen is that your fonts look a little ugly, but that depends on your taste, your monitor resolution and the acuity of your eyesight, so your mileage may vary. At any rate, removing it will not destroy anything. – MarsAtomic Mar 16 '20 at 00:29
  • But I always use JDK and many people do, and I never face this message, it's started to appear when I start using java on kali instead of Ubuntu , do you have any idea why it wasn't appear before, and is that mean that all people who executing java with kali linux face this message? – zyydoosh Mar 16 '20 at 00:42
  • 1
    There's no way for me to know any of that. I don't know what you installed on your personal machine or where you got it. I use Ubuntu and Mint and have never used Kali. That said, seeing as you have the perfect testing environment set up, you should be able to discover the solution yourself. All I know is what I've already reported: _JAVA_OPTIONS is Oracle vendor specific and controls anti-aliasing. – MarsAtomic Mar 17 '20 at 21:34
  • I have better understanding now after some searching around this staff, thanks for your help – zyydoosh Mar 20 '20 at 09:51

0 Answers0