From 6e1c2482f83d608199729dbe5332448573724a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Thu, 26 Apr 2018 13:48:15 +0200 Subject: [PATCH] Support windows --- pmd-dist/src/main/scripts/designer.bat | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pmd-dist/src/main/scripts/designer.bat b/pmd-dist/src/main/scripts/designer.bat index c1d6675d72..d4b5d60b90 100644 --- a/pmd-dist/src/main/scripts/designer.bat +++ b/pmd-dist/src/main/scripts/designer.bat @@ -3,4 +3,16 @@ set TOPDIR=%~dp0.. set OPTS= set MAIN_CLASS=net.sourceforge.pmd.util.fxdesigner.Designer -java -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %* + +:: sets the jver variable to the java version, eg 901 for 9.0.1+x or 180 for 1.8.0_171-b11 +for /f tokens^=2-4^ delims^=.-_+^" %%j in ('java -fullversion 2^>^&1') do set /A jver="%%j%%k%%l" + +if "%jver%" GEQ "900" ( + :: enable reflection + Set jreopts=--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED +) else ( + Set jreopts= +) + + +java %jreopts% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*