source: josm/trunk/tools/pmd/designer.bat@ 18640

Last change on this file since 18640 was 15588, checked in by Don-vip, 5 years ago

tools update: checkstyle 8.27, pmd 6.20, spotbugs 3.1.12

File size: 1.4 KB
Line 
1@echo off
2set TOPDIR=%~dp0..
3set OPTS=
4set MAIN_CLASS=net.sourceforge.pmd.util.fxdesigner.DesignerStarter
5
6
7:: sets the jver variable to the java version, eg 901 for 9.0.1+x or 180 for 1.8.0_171-b11
8:: sets the jvendor variable to either java (oracle) or openjdk
9for /f tokens^=1^,3^,4^,5^ delims^=.-_+^"^ %%j in ('java -version 2^>^&1 ^| find "version"') do (
10 set jvendor=%%j
11 if %%l EQU ea (
12 set /A "jver=%%k00"
13 ) else (
14 set /A jver=%%k%%l%%m
15 )
16)
17
18Set "jreopts="
19:: oracle java 9 and 10 has javafx included as a module
20if /I "%jvendor%" EQU "java" (
21 if %jver% GEQ 900 (
22 if %jver% LSS 1100 (
23 :: enable reflection
24 Set jreopts=--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED
25 )
26 )
27)
28
29set "_needjfxlib=0"
30if /I "%jvendor%" EQU "openjdk" set _needjfxlib=1
31if /I "%jvendor%" EQU "java" (
32 if %jver% GEQ 1100 set _needjfxlib=1
33)
34if %_needjfxlib% EQU 1 (
35 if %jver% LSS 1000 (
36 echo For openjfx at least java 10 is required.
37 pause
38 exit
39 )
40 if [%JAVAFX_HOME%] EQU [] (
41 echo The environment variable JAVAFX_HOME is missing.
42 pause
43 exit
44 )
45 set "classpath=%TOPDIR%\pmd\*;%JAVAFX_HOME%\lib\*"
46) else (
47 set "classpath=%TOPDIR%\pmd\*"
48)
49
50
51java %PMD_JAVA_OPTS% %jreopts% -classpath "%classpath%" %OPTS% %MAIN_CLASS% %*
Note: See TracBrowser for help on using the repository browser.