Debugger throws "Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp" error - java

I've run into a problem while trying to get the Java Debugger extension in VS Code to work. When I run it, an error is thrown that says:
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
From what I can see this error causes the debugger to stop before execution of the program. I unset _JAVA_OPTIONS in .bashrc but that did not fix it.
Any ideas as to what the problem is and possible resolutions to it?
EDIT: I changed development platforms before seeing ZhangTe's answer, but since it solved the problem for another user I'm marking it as accepted.

You can try to add the following to /etc/profile
unset _JAVA_OPTIONS
Then, reboot your computer or reload the profile file.

Related

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on

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!

Picked up _JAVA_OPTIONS in kali linux

Each time i execute java code i get this message:Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
This problem has solution for windows os but i can't find any solution for linux os.
I found a solution to this problem, I lost a lot of time of course. I'm definitely not sure what creates this situation, in my case it happened after installing NetBeans and changing the text display settings, I turned on anti-aliasin.
These settings are defined in these configuration files, just remove them:
/etc/X11/Xsession.d/90kali-themes.conf
/etc/environment.d/95kali-themes.conf
Java Option disabling in terminal
if your using java11-jdk in linux this might be working for disabling the java option from displaying in terminal.
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS" && unset _JAVA_OPTIONS && alias java='java "$_SILENT_JAVA_OPTIONS"'
This is not warning, it is information.
It literally says that some settings were picked up from _JAVA_OPTIONS environmental variable. It is used to configure some switches "globally" for every java application that will be run in given environment. You must have this set either on system or user level. If you remove that variable, information will be gone.
ON Kali Linux ANDROID STUDIO
This information comes because an environment variable called _JAVA_OPTIONS setup by default. I solved it by Unseating the variable.
**To unset the value of this variable, use unset _JAVA_OPTIONS.
After that Android Studio will no longer display the information and Android Studio will be able to build projects that were previously failing to build..

JBOSS/WildFly: CreateProcess error=193, %1 is not a valid Win32-program, how am I supposed to fix this?

I am trying to launch WildFly via IntelliJ
When I add the following line inside the Startup Script:
..\bin\standalone.sh -c standalone-full.xml
I get an error saying:
Error running 'JBOSS':
Cannot run program "C:...." (in directory "C...": CreateProcess error=193, %1 is not a valid Win32-program
I've read on StackOverFlow that this might be a mismatch between 32 bit and 64 bit DLL files? But I doubt this is the case. It works fine without that tag, but I need to launch my server with this startup script.
Or am I missing something else when trying to run a .jar file? I have javac, JAVA_HOME and java -version setup, am I missing something else?
I'm answering my own post because my situation was a really special one, but none the less it would have helped me if I began at this point.
My first issue was that I had no idea I was supposed to use the bat script. (I bet this will give some laughs but whatever)
The second issue, which made everything so confusing, was that my JBOSS_HOME environment variable wasn't setup right.. Well what do you mean wasn't setup right, that's easy bro? Well yes of course it is - but IntelliJ didn't register it properly. So whenever I configured everything, it kept saying that it looked toward another directory, and might not work properly within JBOSS's console.
My fix:
Path was setup correct, but under IntelliJ IDEA's values, it said %JBOSS_HOME%\bin. I wasn't sure if it pointed to the same JBOSS setup that Windows does, or if it pointed to one I had deleted. I removed this from IntelliJ IDEA's path (NOT the Path within Windows) and now IntelliJ finds my JBOSS correctly and it works..
Maybe this helps someone in the future. It would have saved me some time, but atleast I learnt something.

Picked up _JAVA_OPTIONS: -Xmx256M

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]
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 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.
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

Update to IntelliJ 2017.1 causes JAVA_TOOL_OPTIONS to print

This morning I updated to IntelliJ IDEA 2017.1, when I run any of my tests, and even run a hello_world project I made, the console prints a message stating Picked up JAVA_TOOL_OPTIONS: -agentpath:"C:\windows\FireEye\JavaAgentDll_00.dll" after executing my program.
Also, when I try to run in debug mode I receive the error:
ERROR: JDWP unable to get necessary JVMTI capabilities.
If I run the program outside of IntelliJ I do not receive these errors. Is there a solution to resolving the error and is there a reason the JAVA_TOOL_OPTIONS is now "picked up"?
Remove this environment variable from the system or configure the run/debug configuration to not include parent environment:
I solved this problem by adding the following command into idea.bat file:
UNSET JAVA_TOOL_OPTIONS
I'm running IntelliJ 2017.1 on Windows 7, and my idea.bat file is located at C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2017.1\bin folder.
The top 5 lines of my idea.bat file looks like these after the changes:
#ECHO OFF
UNSET JAVA_TOOL_OPTIONS
::----------------------------------------------------------------------
:: IntelliJ IDEA startup script.
::----------------------------------------------------------------------
I've had the same problem at work. This is probably FireEye knowledge rather than an IntelliJ answer, but I find that when I run IntelliJ as administrator the problem goes away without any settings changes, so this works if you have admin access to the development box.
Note that if you start IntelliJ from the IDEA toolbox then the toolbox also needs to be run as adminstrator.
Another way to override the env is from the from the Help | Edit Custom VM Options menu of all places.

Categories