One more update, because the latest 'jre-8u162-windows-i586.exe' installer
includes both 32- & 64-bit JRE installations, whether you want 64-bit or
not. This latest version of the launch script handles this correctly when
there is no JAVA_HOME defined.
<code>
@echo off
setlocal enableextensions enabledelayedexpansion
rem Find the 32-bit JRE
if defined PROGRAMFILES(x86) (set "reg=%windir%\SysWOW64\reg") else set
"reg=reg"
set "branch=HKLM\Software\JavaSoft\Java Runtime Environment"
for /f "tokens=3" %%v in ('%reg% query "%branch%" /v "CurrentVersion" ^|
find "REG_SZ"') do (
for /f "tokens=2*" %%I in ('%reg% query "%branch%\%%v" /v "JavaHome" ^|
find "REG_SZ"') do (
set "JRE32=%%J"
)
)
echo Location of 32-bit java.exe: %JRE32%\bin
if DEFINED JAVA_HOME goto java_home_defined
set "JAVA=%JRE32%\bin\java"
goto java_home_undefined
:java_home_defined
if defined PROGRAMFILES(x86) goto java_home_64bit
set JAVA_HOME=%JAVA_HOME:"=%
if "%JAVA_HOME%"=="" (
set JAVA=java
) else (
set "JAVA=%JAVA_HOME%\bin\java.exe"
set "JAWT_PATH=%JAVA_HOME%\bin"
)
if DEFINED JAWT_PATH goto jawt_path_defined
:java_home_undefined
rem This should work with Java 7 and later.
for /f "delims== tokens=2,3*" %%i in ('"""%JAVA%""
-XshowSettings:properties -version 2>&1 | findstr sun.boot.library.path"')
do set _TMP=?%%i
set _TMP2=%_TMP:? =%
if EXIST "%_TMP2%\jawt.dll" set JAWT_PATH=%_TMP2%
if DEFINED JAWT_PATH goto jawt_path_defined
rem Maybe we're using Java 6?
if EXIST "c:\Program Files\Java\jre6\bin\jawt.dll" set JAWT_PATH=c:\Program
Files\Java\jre6\bin
if DEFINED JAWT_PATH goto jawt_path_defined
echo WARNING: Could not find jawt.dll. Some features may not work properly.
goto start
:java_home_64bit
rem Check for 64-bit JAVA_HOME
if not "%JAVA_HOME:*Files\Java=%" == "%JAVA_HOME%" (
rem Cannot use 64-bit Java, unset JAVA_HOME
echo Unset 64-bit JAVA_HOME
set JAVA_HOME=
rem Use 32-bit JRE
set "JAVA=%JRE32%\bin\java.exe"
set "JAWT_PATH=%JRE32%\bin"
goto jawt_path_defined
) else (
rem JAVA_HOME is 32-bit Java
set "JAVA=%JAVA_HOME%\bin\java.exe"
set "JAWT_PATH=%JAVA_HOME%\bin"
)
:jawt_path_defined
echo JAWT_PATH=%JAWT_PATH%
set PATH=%JAWT_PATH%;%PATH%
echo jawt.dll path: %JAWT_PATH%
goto start
:start
"%JAVA%" -Dsun.java2d.d3d=false -Djava.library.path="%~d0%~p0java" -jar
"%~d0%~p0java\VncViewer.jar" -reqarch x86 %*
</code>
On Thursday, April 5, 2018 at 12:23:07 AM UTC-4, DRC wrote:
>
> Sorry for the delay on this. I'm working feverishly on putting out a
> much-needed VirtualGL release, then I'll switch to working feverishly on
> putting out a much-needed TurboVNC release. I expected to have had
> TurboVNC 2.2 beta out by now, but finishing libjpeg-turbo 2.0 beta
> (which was a prerequisite) took way longer than expected. Thanks for
> your patience as well. :)
>
> DRC
>
> On 3/26/18 1:37 PM, curts wrote:
> > OK, I think I have it sorted now so it will work correctly for both
> > 32-bit & 64-bit JAVA_HOME on 64-bit Windows 7. Thank your for your
> patience.
> >
> > Curt
>
>
--
You received this message because you are subscribed to the Google Groups
"TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/turbovnc-users/7f5232b2-98bf-4a2e-9080-732f11a64d85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.