Java screen scraping & automation
Contents |
How java apps are scraped and automated?
Screen Scraper Studio uses java accessibility to get access to the internal object model of a java app.
Java Accessibility Bridge (JAB) is a piece of software that exposes java accessibility to programs in Windows environment. Screen Scraper Studio uses JAB to get access to the java accessibility model. JAB doesn't come integrated with java runtime environment (JRE) and has to be installed separately.
In order to screen scrape java application you need to install this bridge between java code and library. On the same machine there can be multiple java runtimes (JREs). You can either install java support for all JREs that exist on a machine or you can just install the java support files for the JRE used by the application you have to scrape.
Oracle do not provide a mechanism for allowing automatic installation of JAB to a JRE. You can check their manual installation instruction here.
We have created a helper executable that is able to install JAB on all JREs or to a single JRE. It works in all possible combinations of x86 and x64 versions of Windows and JRE.
Helper to install JAB
ScreenScrapeJavaSupport.exe is a redistributable files that resides on Studio installation folder in JavaSupport subdirectory. You can call it during your setup to install support for all JREs on a machine or you can call it at anytime to install JAB for a particular JRE.
Usage:
ScreenScrapeJavaSupport.exe [/<command>] [/ask] [/jrepath "<path>"] Parameters: <command> may have one of the following values: install, uninstall, printjre, help. If no command is specified, default is help. /ask forces the program to ask for the jre path. If used with /jrepath, it is ignored. /jrepath "<path>" specifies the jre path. If /install is used without specifying a /jrepath then JAB is installed for all JREs found in the system drive (the drive that has Windows folder). Return value may be a combination of the following values: //Success JI_SUCCESS (0x0000) //critical errors JI_ERR_ALREADY_INSTALLED (0x0001) JI_ERR_JRE_NOT_FOUND (0x0002) JI_ERR_BRIDGE_NOT_INSTALLED (0x0004) JI_ERR_UNKNOWN_COMMAND (0x0008) JI_ERR_COPY_FILE (0x0010) JI_ERR_OPERATION_ABORTED (0x0020) //Non critical errors JI_ERR_REBOOT_NEEDED (0x0100) JI_ERR_NOT_ALL_FILES_DELETED (0x0200) Examples:
Install JAB for all JREs
ScreenScrapeJavaSupport.exe /install install JAB for all JRE in system drive (not all drives). Recommended to call it from your setup.
Install JAB for a particular JRE
ScreenScrapeJavaSupport.exe /install /jrepath "<path>" install using the specified JRE path, where path can be: - default JRE: "C:\Program Files (x86)\Java\jre6" - default JRE x64: "C:\Program Files\Java\jre6" - custom JRE (Deskzilla): "C:\Program Files (x86)\Deskzilla\jre"
Uninstall JAB from a particular JRE
ScreenScrapeJavaSupport.exe /uninstall /jrepath "<path>" uninstall the files pertaining to this JRE
Other examples
ScreenScrapeJavaSupport.exe /printjre /jrepath "<path>" print JRE location and version for the specified path ScreenScrapeJavaSupport.exe /help ScreenScrapeJavaSupport.exe /? print this message
Migrating from JAB 2.0.1 to JAB 2.0.2
Prior to v4 SSS used JAB 2.0.1. For customers that already instrumented their Java apps with JAB 2.0.1 it's recommended to uninstall it prior to use JAB 2.0.2. Installing the new version of the bridge will overwrite the previous one.
Supporting old JRE <1.5
They are hardly found at large but in particular Oracle JInitiator that is used to run Oracle forms apps is still to be supported. If you have this situation please contact us at support@deskperience.com