Support for Java Web Start has been removed from Java version 11. |
Description
The JWSLaucnher
property specifies the Java Web Start launcher (javaws.exe) that will be used to run the Web Start application. This is the same value as the one specified in the Java Web Start launcher to use parameter for the tested Web Start application in the TestedApps editor.
Declaration
JavaWebStartTestedAppObj.JWSLaucnher
Read-Write Property | String |
JavaWebStartTestedAppObj | An expression, variable or parameter that specifies a reference to a JavaWebStartTestedApp object |
Applies To
The property is applied to the following object:
Property Value
A string value containing the fully-qualified path to the Java Web Start launcher.
Remarks
If you assign a value to this property, TestComplete will treat your project as modified. So, you will need to save or cancel changes when closing the project. The specified value will be displayed in the TestedApps editor.
To specify the property value, you can use project and project suite variables as well as the operating system’s environment variables.
The project or project suite variables must be of the string type. To refer to them, use the following syntax --
--for example, “$(MyVar1)”.
Note: | When evaluating the value of the property, TestComplete first searches for the specified variable in the project variables, then in the project suite variables. Please keep this in mind if you have project and project suite variables with the same names. |
To refer to environment variables, use the following syntax --
-- for example, %Path%.
Note that variables can refer to each other, for instance, a project variable may include a reference to an environment variable. TestComplete will recursively analyze the variables and form the resulting value that does not contain variable names.
Example
The following example adds a new Java Web Start application to a project, specifies its launch parameters and then launches the application:
JavaScript, JScript
function Test()
{
// Add a Java Web Start application to the project
var ind = TestedApps.AddJavaWebStartApp();
var app = TestedApps.Items(ind);
// Specify Web Start application's launch parameters
app.JWSLauncher= "C:\\Program Files\\Java\\jre1.8.0\\Bin\\javaws.exe";
app.Location = "https://docs.oracle.com/javase/tutorialJWS/samples/deployment/dynamictree_webstartJWSProject/dynamictree_webstart.jnlp";
// Launches the Web Start application
app.Run();
// Test the application
…
app.Close();
}
Python
def Test():
# Add a Java Web Start application to the project
ind = TestedApps.AddJavaWebStartApp();
app = TestedApps.Items(ind);
# Specify Web Start application's launch parameters
app.JVMExecutable = "C:\\Program Files\\Java\\jre1.8.0\\Bin\\javaws.exe";
app.Location = "https://docs.oracle.com/javase/tutorialJWS/samples/deployment/dynamictree_webstartJWSProject/dynamictree_webstart.jnlp"
# Launches the Web Start application
app.Run();
# Test the application
# ...
app.Close();
VBScript
Sub Test
' Add a Java Web Start application to the project
ind = TestedApps.AddJavaWebStartApp
Set app = TestedApps.Items(ind)
' Specify Web Start application's launch parameters
app.Launcher = "C:\Program Files\Java\jre1.8.0\Bin\javaws.exe"
app.Location = "https://docs.oracle.com/javase/tutorialJWS/samples/deployment/dynamictree_webstartJWSProject/dynamictree_webstart.jnlp"
' Launches the Web Start application
app.Run
' Test the application
…
app.Close
End Sub
DelphiScript
procedure Test();
var ind, app;
begin
// Add a Java Web Start application to the project
ind := TestedApps.AddJavaWebStartApp();
app := TestedApps.Items(ind);
// Specify Web Start application's launch parameters
app.JWSLauncher := 'C:\Program Files\Java\jre1.8.0\Bin\javaws.exe';
app.Location := 'https://docs.oracle.com/javase/tutorialJWS/samples/deployment/dynamictree_webstartJWSProject/dynamictree_webstart.jnlp';
// Launches the Web Start application
app.Run;
// Test the application
…
app.Close;
end;
C++Script, C#Script
function Test()
{
// Add a Java Web Start application to the project
var ind = TestedApps["AddJavaWebStartApp"]();
var app = TestedApps["Items"](ind);
// Specify Web Start application's launch parameters
app["JWSLauncher"] = "C:\\Program Files\\Java\\jre1.8.0\\Bin\\javaws.exe";
app["Location"] = "https://docs.oracle.com/javase/tutorialJWS/samples/deployment/dynamictree_webstartJWSProject/dynamictree_webstart.jnlp";
// Launches the Web Start application
app["Run"]();
// Test the application
…
app["Close"]();
}
See Also
JavaWebStartTestedApp Object
Testing Java Applications
Testing Oracle Applications
Java Application Parameters
Java Web Start Application Parameters