Java launching issue. UFT GUI
Question ID: 107246

For some reason I cannot get java to launch.

Marked as spam
Posted by (Questions: 63, Answers: 1)
Asked on November 2, 2016 3:34 pm
Answers (1)
Private answer

There could be a problem with the Java Windows Environment Variable _JAVA_OPTIONS. Java Windows Environment Variables uses Short name/path. Check if the situation happens when the Java/Oracle Add-in Java (or Oracle) Add-in configuration crashes (or prevent start/launch of) Java variables uses short paths instead of long paths, for example, changing ''_JAVA_OPTIONS '':

NOTE: If changing Windows Environment Variables, test behavior after changing values and rebooting/restarting machine


-Xrunjvmhook -Xbootclasspath/a:''C:Program Files (x86)HPUnified Functional Testingbinjava_sharedclasses'';''C:Program FilesHPUnified Functional Testingbinjava_sharedclassesjasmine.jar''

AFTER: IMPORTANT: Notice below does not use spaces or double quotes

-Xrunjvmhook -Xbootclasspath/a:C:PROGRA~2HPUNIFIE~1binJAVA_S~1classes;C:PROGRA~2HPUNIFIE~1binJAVA_S~1classesjasmine.jar

Below is a VBS file to get short path. Create a VBS file ''ConvertToShortPath.vbs'' with below code:

set fso = CreateObject(''Scripting.FileSystemObject'')
strLongName = ''C:Program Files (x86)HPUnified Functional Testingbinjava_sharedclasses''
strLongName32 = ''C:Program FilesHPUnified Functional Testingbinjava_sharedclasses''
strShortName = ''Invalid File/Folder - ('' & strLongName & '')''

Set fsoFile = Nothing
On Error Resume Next
Set fsoFile = fso.GetFile(strLongName)
if Err.number <> 0 then
Set fsoFile = fso.GetFolder(strLongName)
End if

if Err.number <> 0 then
Set fsoFile = fso.GetFolder(strLongName32)
End if

if Err.number <> 0 then
Wscript.Echo ''Unable to find path''
End if

if fsoFile is not nothing then strShortName = fsoFile.ShortPath
On Error Goto 0

Set WshShell = WScript.CreateObject(''WScript.Shell'')
WshShell.Run ''cmd.exe /c echo '' & strShortName & '' | clip'', 0, TRUE

Wscript.Echo ''Short Name is in the clipboard. '' & vbCrLf & strShortName

Set WshShell = nothing
set fsoFile = nothing
set fso = nothing

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on November 2, 2016 3:36 pm

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

Scroll to Top