Preparing Java Web Start Applications for Testing With TestComplete

Applies to TestComplete 15.69, last modified on November 13, 2024

Support for Java Web Start has been removed from Java version 11.

TestComplete provides access to Java Web Start applications (.jnlp) that are open in Internet Explorer.

Before testing your Java Web Start application, you may need to configure the environment in order for your tests to work correctly.

Preparing the Javaws.Policy File

To configure the javaws.policy file, do the following:

  • Locate the javaws.policy file, which is normally located in the <Java-dir>\lib\security\ subfolder of the JRE (Java Runtime Environment) folder.

    You need to prepare the javaws.policy file for the JRE that has the same bitness as the tested Java Web Start application.
  • Open this file in the appropriate text editor.

  • Write the following lines for the grant group:

    permission java.lang.RuntimePermission "accessClassInPackage.sun.awt.windows";
    permission java.lang.RuntimePermission "accessDeclaredMembers";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";

If You Use JavaFX

If your Java Web Start application contains JavaFX controls, then you need to make any of the following changes to the <Java-dir>\lib\security\javaws.policy file:

  • Add the java.security.AllPermission permission (it will enable all the other permissions):

    grant {
        permission java.security.AllPermission;
    };

– or –

  • Specify the permission java.security.AllPermission for the codebase of your Java Web Start app:

    grant codeBase "file:///c:/work/my-javafx-app.jar" {
        permission java.security.AllPermission;
    };

Preparing the Web Browser

If you are testing a Java Web Start application embedded into a web page, you may need to configure your browser. For example, you may need to set the page’s zoom ratio or prevent security warnings. For detailed instructions, see Preparing Web Browsers.

See Also

Testing Java Applications - Overview
Testing Java Applications

Highlight search results