Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How do I get the SilkTest SWTTestApp to work via the classpath with a JDK rather than a JRE?

How do I get the SilkTest SWTTestApp to work via the classpath with a JDK rather than a JRE?

Problem:

How do I get the SilkTest SWTTestApp to work via the classpath with a JDK rather than a JRE?

Resolution:

QUESTION
----------------------------------
How do I get the SilkTest SWTTestApp to work via the classpath with a JDK rather than a JRE?

ANSWER
----------------------------------
Although you are now using a JDK, you will be copying all of the relevant files into the JRE folder of the JDK, so effectively you are still using a JRE. This resolution also assumes that you are using Eclipse 3.1.2; the Eclipse SWT dll filenames may be different for earlier supported versions of Eclipse.

Copy the Eclipse dll files (swt-awt-win32-3139.dll, swt-gdip-win32-3139.dll, swt-win32-3139.dll) to C:\Program Files\Java\jdk1.5.0_11\jre\bin
Copy the Eclipse swt.jar to C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext

Create the following batch file to launch the SWTTestApp

rem Silktest SWTTestApp using the JDK
rem *********************************
set JavaRun="C:\Program Files\Java\jdk1.5.0_11\bin\java.exe"
cd /d "C:\Program Files\Borland\SilkTest\Javaex\SWTTest"
%JavaRun% -classpath c:\Progra~1\Borland\SilkTest\JavaEx\SilkTest_Java3.jar;C:\Progra~1\Borland\SilkTest\JavaEx\SWTTest\SwtTestApp.jar qapswttest.TestApp


When you enable the extensions for SilkTest and run the extension test, it may come back as Test Failed. If this is the case, try Recording Window Declarations; if you see SWT in the identifiers (e.g. SWTTextField) the extensions have actually enabled successfully.

Old KB# 20814

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:14
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.