Archive: Unattended Java install successful, files deleted after reboot


Unattended Java install successful, files deleted after reboot
I'm experiencing a difficult to diagnose problem running an unattended install of Java SDK. The problem is really twofold.

First problem. Sometimes the unattended Java install fails, but if I run the install a second time (in the same invocation of NSIS), it succeeds. I have actually put in "retry" code, which is a serious hack, like this:

!ifdef WIN64
File "/oname=$TEMP\jdk1.6.0_18.exe" ..\..\..\Products\jdk-6u18-windows-x64.exe
!else
File "/oname=$TEMP\jdk1.6.0_18.exe" ..\..\..\Products\jdk-6u18-windows-i586.exe
!endif
# This copy files is a hack for Windows Server 2003
CopyFiles /silent "$TEMP\jdk1.6.0_18.exe" "$TEMP\java_install.exe"
ExecWait '"$TEMP\java_install.exe" /passive ADDLOCAL="ToolsFeature" IEXPLORER=0 MOZILLA=0 REBOOT=Suppress' $0
# This is also a hack for Windows Server 2003
${If} "$0" != "0"
DetailPrint "Java install returned $0"
ExecWait '"$TEMP\java_install.exe" /passive ADDLOCAL="ToolsFeature" IEXPLORER=0 MOZILLA=0 REBOOT=Suppress' $0
DetailPrint "Second Java install returned $0"
${EndIf}

Sometimes the first install exits prematurely and a non-zero exit code is returned (and the installation of Java is indeed "partial"). However, the second invocation (of the same installer) invariably succeeds.

I am curious if anyone has any clues as to why this happens?

Secondly, and more serious and mysterious to me is:

On Windows 2008 after installation, our Java server -- run as a service -- successfully starts. It can be stopped and started at will. However, [on some systems] after a reboot of Windows 2008, some of the Java files (rt.jar among them) in the Java SDK installation have been deleted and the service will no longer start. It's as if these files were "rolled back" or removed by Windows.

Does anyone have any clues as to why this might happen?

Regards


Firstly I would identify a machine which you can reproduce the problem on and run the Java silent install manually. You should also get in contact with Sun regarding this problem. I don't think NSIS is at fault here.

Also why do you have to extract as jdk1.6.0_18.exe and then copy to java_install.exe? Why not just extract as java_install.exe in the first place?

Stu