Java error on Garuda Sway

Hi, today I installed Garuda Sway and when I try to execute java I got that error:

[:red_circle:] × java --version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true {-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true {}}
Unrecognized option: {-Dawt.useSystemAAFontSettings=on
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

What can I do?

Thanks :blush:

Hi there, welcome to the community.

Did you try looking for solution in


Hi sir, I tried to edit the files that say the ArchWiki with these arguments but not work, I got the same error.

Find and remove this line.

Nice one error is removed, now only one left:

NOTE: Picked up JDK_JAVA_OPTIONS: {-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true {}}
Error: Cannot specify main class in environment variable JDK_JAVA_OPTIONS

How did you install java? Looks like it is working fine for me

Screenshot from 2021-05-30 21-01-01

 ╰─λ java --version         
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9)
OpenJDK 64-Bit Server VM (build 11.0.11+9, mixed mode)

I installed with

sudo pacman -S jdk11-openjdk

Also post

sudo pacman -Ss jdk
1 Like

Ok I'll try, I installed java 15, maybe that's the error

Wait, I will try 15

Ok, I installed java 15 with the garuda assistant (Normally I install java 11)

 ╰─λ java --version
openjdk 15.0.2 2021-01-19
OpenJDK Runtime Environment (build 15.0.2+7)
OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode)

Working fine too

Looks like an issue with setup assistant.

1 Like

Maybe I reinstall sway and install java manually, without the setup assistant?

Maybe just reinstall jdk15-openjdk

1 Like

Ok I'll try

Thank you very much for your help sir, the problem is fixed, to remove the errors I deleted all the arguments of "export _JAVA_OPTIONS" from the .profile into the user directory, I reboot and java executed successfully with no errors. (i tested some java programs and runs very well).

One question, how can I put the post as resolved or closed?.

Thanks :blush:

Just click on
and then

done :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.