@echo off
setlocal enableextensions
if DEFINED JAVA_HOME goto defined

set JAVA=java
goto start

:defined
set JAVA_HOME=%JAVA_HOME:"=%
if "%JAVA_HOME%"=="" (
	set JAVA=java
) else (
	set JAVA="%JAVA_HOME%\bin\java.exe"
)
set JAVA=%JAVA:"=%

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