Getting error trying to update Java 8 on UFT machine
Question ID: 106116
1
0

I have been able to use java 8 fine on my UFT machine for a while. Now, when it goes to update, I’m getting an error message and the install fails.

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on May 21, 2015 3:31 pm
145 views
Answers (2)
3
Private answer

I have done a little research, and it appears that there is currently an issue with the Java 8 (1.8) updater. It will fail if there are java environment variables set. You will most likely get either error 1603 or 1618, although one user has reported a 1722 for the offline installer. This is currently an issue under investigation with Oracle and doesn't appear to be isolated with UFT and can affect other applications:

http://www.java.com/en/download/help/error_1603.xml

The workaround is to temporarilly remove the java environment variables, run the update or installer, and replace the variables. You can also try placing the following VBscript code in a .vbs file and running it. It will backup the environment variables, run the installer, and replace the variables. This code is provided 'as is' with no warranty that it will work. Make sure you have a backup before doing anything:

Set wshShell = CreateObject( ''WScript.Shell'' )
Set wshSystemEnv = wshShell.Environment( ''SYSTEM'' )

Set objFSO=CreateObject(''Scripting.FileSystemObject'')
Set objFile = objFSO.CreateTextFile(''C:_JAVA_OPTIONS.txt'',True)
objFile.Write wshSystemEnv(''_JAVA_OPTIONS'') & vbCrLf
objFile.Close
Set objFile =Nothing
Set objFile = objFSO.CreateTextFile(''C:IBM_JAVA_OPTIONS.txt'',True)
objFile.Write wshSystemEnv(''IBM_JAVA_OPTIONS'') & vbCrLf
objFile.Close
Set objFile =Nothing
Set objFile = objFSO.CreateTextFile(''C:JAVA_TOOL_OPTIONS.txt'',True)
objFile.Write wshSystemEnv(''JAVA_TOOL_OPTIONS'') & vbCrLf
objFile.Close
set objFile = nothing

Set wshUserEnv = wshShell.Environment( ''USER'' )
Set objFSO=CreateObject(''Scripting.FileSystemObject'')
Set objFile = objFSO.CreateTextFile(''C:U_JAVA_OPTIONS.txt'',True)
objFile.Write wshUserEnv(''_JAVA_OPTIONS'') & vbCrLf
objFile.Close
Set objFile =Nothing
Set objFile = objFSO.CreateTextFile(''C:UIBM_JAVA_OPTIONS.txt'',True)
objFile.Write wshUserEnv(''IBM_JAVA_OPTIONS'') & vbCrLf
objFile.Close
Set objFile =Nothing
Set objFile = objFSO.CreateTextFile(''C:UJAVA_TOOL_OPTIONS.txt'',True)
objFile.Write wshUserEnv(''JAVA_TOOL_OPTIONS'') & vbCrLf
objFile.Close
set objFile = nothing

wshSystemEnv( ''_JAVA_OPTIONS'' )=''''
wshSystemEnv( ''IBM_JAVA_OPTIONS'' )=''''
wshSystemEnv( ''JAVA_TOOL_OPTIONS'' )=''''
wshUserEnv( ''_JAVA_OPTIONS'' ) = ''''
wshUserEnv( ''JAVA_TOOL_OPTIONS'' ) = ''''
wshUserEnv( ''IBM_JAVA_OPTIONS'' ) = ''''

WshShell.Run ''C:Java8.exe'',1,true

Set objFile = objFSO.OpenTextFile(''C:_JAVA_OPTIONS.txt'')
strLine= objFile.ReadLine
wshSystemEnv( ''_JAVA_OPTIONS'' )=strLine
objFile.close
Set objFile =Nothing
Set objFile = objFSO.OpenTextFile(''C:IBM_JAVA_OPTIONS.txt'')
strLine= objFile.ReadLine
wshSystemEnv( ''IBM_JAVA_OPTIONS'' )=strLine
objFile.close
Set objFile =Nothing
Set objFile = objFSO.OpenTextFile(''C:JAVA_TOOL_OPTIONS.txt'')
strLine= objFile.ReadLine
wshSystemEnv( ''JAVA_TOOL_OPTIONS'' )=strLine
objFile.close
Set objFile =Nothing

Set objFile = objFSO.OpenTextFile(''C:U_JAVA_OPTIONS.txt'')
strLine= objFile.ReadLine
wshUserEnv( ''_JAVA_OPTIONS'' )=strLine
objFile.close
Set objFile =Nothing
Set objFile = objFSO.OpenTextFile(''C:UIBM_JAVA_OPTIONS.txt'')
strLine= objFile.ReadLine
wshUserEnv( ''IBM_JAVA_OPTIONS'' )=strLine
objFile.close
Set objFile =Nothing
Set objFile = objFSO.OpenTextFile(''C:UJAVA_TOOL_OPTIONS.txt'')
strLine= objFile.ReadLine
wshUserEnv( ''JAVA_TOOL_OPTIONS'' )=strLine
objFile.close
Set objFile =Nothing

objFSO.DeleteFile ''C:_JAVA_OPTIONS.txt''
objFSO.DeleteFile ''C:IBM_JAVA_OPTIONS.txt''
objFSO.DeleteFile ''C:JAVA_TOOL_OPTIONS.txt''
objFSO.DeleteFile ''C:U_JAVA_OPTIONS.txt''
objFSO.DeleteFile ''C:UIBM_JAVA_OPTIONS.txt''
objFSO.Delete

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on May 21, 2015 3:35 pm
0
I ran this and it worked fine for me.
( at May 21, 2015 4:02 pm)
1
Private answer

HP has release document [KM01770503][1] for this issue and they recommend doing what @Rich Text recommends but instead of removing _JAVA_OPTIONS they recommend renaming it.

Here is quote from the HP document:

Rename (or delete) UFT's _JAVA_OPTIONS environment variable before updating Java 8 and restore
this variable back after installation. See detailed steps:

1. Click on ''Start'' button and then right-click on ''Computer''
2. Choose ''Properties'' from the context menu
3. Click on ''Advanced system settings'' link
4. Click on ''Environment Variables...'' button
5. There are two sections here:
User variables for < user name>
System variables
6. Look for _JAVA_OPTIONS environment variable on both sections and rename it (i.e:1_JAVA_OPTIONS)
7. Install Java 8
8. Once Java 8 is installed, rename back the mentioned environment variable

[1]: https://softwaresupport.hp.com/group/softwaresupport/search-result/-/facetsearch/document/KM01770503

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on August 6, 2015 1:19 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top