@echo off
setlocal enableextensions
if DEFINED JAVA_HOME goto defined

set JAVAW=javaw
goto start

:defined
set JAVA_HOME=%JAVA_HOME:"=%
if "%JAVA_HOME%"=="" (
	set JAVAW=javaw
) else (
	set JAVAW="%JAVA_HOME%\bin\javaw.exe"
)
set JAVAW=%JAVAW:"=%

:start
start /b "" "%JAVAW%" -server -Dsun.java2d.d3d=false -Djava.library.path="%~d0%~p0java" -jar "%~d0%~p0java\VncViewer.jar" -reqarch @REQARCH@ %*
