Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Little script to fix the swing rendering issues with Java
@echo off
title Java Swing Graphical Glitch Fixer
color 02
:checkadmin
net file 1>nul 2>nul
if '%errorlevel%' == '0' (
goto ask
) else (
powershell "saps -filepath %0 -verb runas" >nul 2>&1
)
exit /b
echo.
echo Little script to fix the swing rendering issues with Java
echo.
:ask
echo.
echo Operations:
echo 1) Apply the fix
echo 2) Revert the fix
echo 3) Exit
echo.
set /p response=Operation: %=%
cls
if '%response%' == '1' (
setx /m J2D_D3D "false"
echo The fix has been applied, you can leave now
goto ask
) else if '%response%' == '2' (
setx /m J2D_D3D "true"
echo The fix has been reverted, you can leave now
goto ask
) else if '%response%' == '3' (
echo Exiting...
exit
) else (
echo This is a unvalid operation...
goto ask
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.