http://www.mathworks.com/matlabcentral/newsreader/view_thread/323327
MATLAB Central Newsreader  How to Configure Matlab to Work with Jaws Screen Reader
Feed for thread: How to Configure Matlab to Work with Jaws Screen Reader
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Mon, 24 Sep 2012 22:17:31 +0000
How to Configure Matlab to Work with Jaws Screen Reader
http://www.mathworks.com/matlabcentral/newsreader/view_thread/323327#888052
Muzzamil Lakhani
How to Setup and Use Matlab With Jaws<br>
<br>
The problem of accessibility within Matlab with Jaws arises due to the presence of Java within Matlab, which does not come preenabled with the accessibility fix known as Java Access Bridge (jabswitch). Oracle has, as of Java v1.7.0_06 and above, started to ship the Access Bridge prebundled with the installation of Java. At the time of writing, the latest version of the Access Bridge stands at 2.0.3 – and the purpose of the Access Bridge is to allow Java based applications to provide testing and use of otherwise inaccessible GUI components of programmes. <br>
<br>
This method of enabling accessibility with Jaws has been tested using Matlab R2012a 64 bit with Jaws 12 (64 bit) on Windows 7 Professional SP1 (64 bit) on a machine having the following hardware specifications:<br>
an Intel Core2Dual i7 2.7GHz processor with 8GB RAM, having Oracle JDK 1.7.0_07 64 bit and the Java access Bridge stands at 2.0.3 and is enabled system wide. The hardware is a 13 inch Macbook Pro early 2011 which has been upgraded to Mac OS 10.8.1 .<br>
<br>
The installation of Oracle JDK 1.7.0_07, even with jabswitch v2.0.3 enabled does not resolve the issues of accessibility of Matlab with Jaws because Matlab uses its own inbuilt version of Java, which still stands at 1.6.0_17, and the Java has not yet been updated to 1.7.0 even after the release of Matlab R2012b. Therefore, in order to allow the functionality of jabswitch on Matlab, a version of the appropriate Access Bridge manually needs to be installed corresponding to the version of Java on Matlab.<br>
<br>
This work describes in detail the procedure for optimising the accessibility of Matlab’s menu bars and command window with Jaws. This method has been tested for backward compatibility with R2011a 32bit using Jaws 11 64 bit on Windows XP Professional 64 bit, where JDK 1.7.0_01 was made to work with a manual system wide installation of jabswitch 2.0.2 and this method will probably also work with earlier versions of Matlab and Jaws together, regardless of computer architecture. This document is intended to fill the gap in the lack of accessibility notes in the installation and testing of Matlab, which at the time of writing, has official instructions only up to a Jaws version 7, released long before the advent of Windows 7. Official documentation at this time does not delve into the version of Matlab used to test this architecture, nor is there any information on the accessibility of 64 bit <br>
versions of Matlab products. <br>
<br>
Summary of Steps to make Matlab accessible with Jaws<br>
This section lists the steps required to allow users and developers alike to test Matlab installation with Jaws the <br>
1. Check the architecture of the Operating System<br>
2. Install Jaws<br>
3. Install Oracle JDK 1.7.0_06 or higher<br>
4. Enable Java Access Bridge on a system wide basis<br>
5. Install Matlab<br>
6. Set Path of relevant libraries necessary to link to Jaws<br>
7. Manually install the appropriate Java Access Bridge to work with Matlab Java<br>
8. Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window<br>
<br>
Please note: Steps 25 can be performed in any order of preference. This flexibility not only allows users of Jaws to work with Matlab, but also allows developers of Java and Matlab based applications to test their products for compliance with the necessary accessibility requirements. The following sections describe in details all the above steps, in an attempt to provide a walk through the process.<br>
<br>
<br>
Check the Architecture of the Operating System<br>
Generally this information is available at the point of installation of Windows. It can be obtained not only from the initial product documentation, but also from the command prompt. To obtain the architecture, type the following into the Command Prompt:<br>
<br>
>comparch –<br>
<br>
Output: <br>
I386: 32 bit<br>
I686 / x64: 64 bit<br>
<br>
This information is vital as it is the most important factor in the precedence chain to determine the version of Java, Jaws and Matlab that will effectively work together for best accessibility results. The chain of precedence, in order of most important factor first, is as follows:<br>
a. Windows Architecture (64  32 bit)<br>
b. Jaws (64  32 bit)<br>
c. JDK SE7 U6+ (64 32 bit)<br>
d. Java Access Bridge (64  32 bit)<br>
e. Matlab architecture (or more precisely, the Matlab JVM architecture) (64  32 bit)<br>
From the above, it is evident to see that if at any point during the chain, a lower bit version is used, all the proceeding factors cannot be a higher bit architecture. For example, if the Jaws used is a 32 bit version, then JDK, jabswitch and Matlab must all be 32 bit if this solution is to work. At any point along this chain however, it is possible to move to a lower bit version, but all subsequent factors must then be lower bit architectures as well.<br>
<br>
Install Jaws<br>
A demo version, allowing 40 minutes of access at a time (before the machine would require a restart for it to function again) can be downloaded free of charge from the Freedom Scientific Website: <a href="http://www.freedomscientific.com">http://www.freedomscientific.com</a> where a full version can also be purchased. For best performance, it is always recommended that the latest version of Jaws be used for application interaction and development testing. Please also note that although Jaws 11 is available in a 64 bit version, it will only work best with a 32 bit Matlab architecture. In order to test the full capability of Matlab 64 bit, a 64 bit version of Jaws 12 or higher is required. If Jaws licensing is setup on a network, ensure that the system PATH variable points to the location of the Jaws network. <br>
<br>
It is possible to have multiple versions of Jaws simultaneously installed on a single computer. However, only one instance of Jaws can run at any given time. <br>
<br>
Install Oracle JDK 1.7.0_06 or higher<br>
Oracle has officially stopped maintaining JDK SE 6 and encourages users to upgrade their Java to SE7 Update 6 or higher for best performance, improved stability and some important security fixes. This is also the recommendation if the system only has a public Java Runtime Environment (jre7). Java SE 7 is interchangeably referred to as 1.7.0 and in order to install and run Matlab, JDK is not a prerequisite, although having a JDK does allow much better functionality as well as appropriate tools for Java development. Instructions for installing the JRE are listed on the Oracle Java Page <a href="http://java.sun.com">http://java.sun.com</a> along with those for installing the JDK. The page also provides links to the latest Java downloads. <br>
<br>
Although the installation procedure is similar, this work concentrates mainly on the use of JDK. After downloading the installer package, just run the setup and follow the onscreen instructions. When the installer finishes, set the PATH to Java for convenience by following these steps:<br>
1. Either enter within the Search field within the Start Menu the words “environment variables” or locate it through Control Panel, depending on the version of Windows<br>
2. Locate the “Edit System Environment Variables” button<br>
3. Add the following to the end of the PATH variable (if the existing line does not have a semicolon (;) add one and then type the PATH to the Java Installation). For most users, this normally looks like:<br>
<br>
C:\Program Files\Java\jdk1.7.0_07\bin;<br>
<br>
If the Java is installed in a different location, locate the bin folder within the Java JDK directory. System privileges must allow for this step to be carried out<br>
4. Restart the system<br>
5. To test the setup of Java, enter the following command in the Command Prompt:<br>
<br>
>java –version<br>
Although multiple instances of Java are allowed on a machine, it is always best to install the version corresponding to the Computer’s architecture<br>
6. If any custom scripts have been installed on Jaws, just recompile the default.jss file within Jaws (do not amend anything) and save the result<br>
7. Restart Jaws (if installed and running)<br>
<br>
Installation of Java prior to Matlab installation improves the setup and initialisation of Matlab and also provides better accessibility to the Matlab online documentation.<br>
<br>
Enabling the Java Access Bridge on a System Wide basis<br>
Java SE 7U6 and above come bundled with the Java Access Bridge, allowing users to enable it for all GUI applications without having to perform a complicated set of copypasting of files to locations buried deep within the Java hierarchy. To enable Java Access Bridge:<br>
1. press WIN+u to launch the Ease of Access Centre<br>
2. Navigate to “Use the Computer Without A Display”<br>
3. Check the box “Enable Java Access Bridge”<br>
4. Click OK<br>
5. Restart for good measure<br>
Alternatively, to enable Java Access Bridge from the Command Line, open the Command Prompt, navigate to the folder corresponding to the Java PATH variable and type the following:<br>
<br>
>jabswitch –enable<br>
<br>
The output should inform that the jabswitch has been enabled. To enable Java Access Bridge for all users, repeat the above steps for each user.<br>
<br>
If multiple instances of Java are installed on a system, the above steps for enabling the jabswitch via the Command prompt must be repeated for each instance of the JDK. If using Jaws, Freedom Scientific discourages using multiple instances of the Java Access Bridge simultaneously. For optimal performance and speed, it is recommended that If using a 64 bit instance of the JDK, users should also install the jre7 32 bit version to allow better access to the Matlab online documentation and help on a range of browsers. <br>
<br>
Installing Matlab<br>
Install the relevant version of Matlab either from the installation media or from the Mathworks website <a href="http://www.mathworks.com">http://www.mathworks.com</a> and restart the system. Launch the application after launching Jaws. Once the Matlab Command Window has launched, try navigating to the menu bar by pressing ALT+F. Navigate left and right to explore the menus, and notice that Jaws does not announce anything at this point. This is because of the presence of Matlab’s own JRE, which is a separate entity from the system Java and differs in version. To make the Matlab Java work with the accessibility features, the relevant Java Access Bridge needs to be installed.<br>
<br>
On the Matlab Command Window, type the following commands and record the outputs for later use:<br>
<br>
>matlabroot<br>
<br>
>version –java<br>
<br>
These commands list the installation of the Matlab structure, and also the version of JRE used by the installed Matlab on the system. <br>
<br>
Typical values of the above commands may look something as follows (exact dvalues depend on the system installation and version of Matlab):<br>
<br>
>matlabroot<br>
<br>
Ans= C:\Program Files\Matlab\R2012a <br>
<br>
>version –java<br>
<br>
Ans= <br>
Java 1.6.0_17b04 with Sun Microsystems Inc. Java HotSpot(TM) 64Bit Server VM mixed mode<br>
<br>
<br>
These will be required in the following sections. Notice the 64 bit indication of Java from the above output, indicating that the installed Matlab, and its JRE are indeed 64 bit, and will therefore require a 64 bit Java Access Bridge and will work best with a Jaws that is also 64 bit, as explained in the precedence chain above. For 32 bit versions of Matlab, a 32 bit Java Access Bridge needs to be installed as expected. <br>
<br>
It is important to note that:<br>
1. Installing a 64 bit version of the Java Access Bridge on a 32 bit Matlab Java will not work with Jaws, and might hinder the program’s performance. <br>
2. Installing a 32 bit Java Access bridge on a 64 bit version of Matlab will only allow partially improved accessibility, and there is no guarantee of this.<br>
At this point, it is important to be reminded that enabling the Java Access Bridge v2.0.3 with JDK SE 7 system wide would certainly improve Matlab’s download and installation performance, and also allow Jaws to add Matlab related scripts in the default.jss file. In addition, it will also improve the accessibility of other Java based programs, improve the performance of Jaws and also provide means to test and future proof any Java based applications developed using Matlab for use with other third party utilities.<br>
<br>
Set Path of relevant libraries necessary to link to Jaws<br>
If Matlab and Jaws are installed simultaneously, there are certain libraries that allow Matlab to link to the built in functionality of Jaws. To set the launch of these libraries, simply include the following line to the end of the PATH system environment variable (Do not forget to include the ; at the end of this – it is imperative in this case):<br>
<br>
For a 64 bit Matlab:<br>
Matlabroot\bin\win64; <br>
<br>
For a 32 bit Matlab:<br>
Matlabroot\bin\sys32;<br>
<br>
The matlabroot is the value obtained above. Note that the coexistence of Matlab and Jaws does not impair performance, and disabling or quitting Jaws will still allow the user to use Matlab effectively following a relaunch of Matlab. Additionally, in order to develop accessible applications using Matlab and it’s compiler, set the following PATH variable:<br>
For a 64 bit system:<br>
Matlabroot\runtime\win64\ <br>
<br>
For a 32 bit system:<br>
Matlabroot\runtime\sys32\<br>
<br>
For reasons not fully understood, enabling both the above as PATH variables, the overall improvement of Matlab’s start up window is improved. However, there is still no Java Access Bridge on the Matlab JRE. The following section describes this installation procedure, which for earlier versions of the Java SE can also be used for the system wide installation of the Java Access Bridge.<br>
<br>
Manually install the appropriate Java Access Bridge to work with Matlab Java<br>
Download the relevant version of the Java Access Bridge from the Oracle Java Archives Download Page: <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html">http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html</a> and follow the instructions relevant for the specific version of the Matlab JRE. The reason for the choice of the Java Access Bridge downloads is the different versions of the JVM releases, and the corresponding Java Access Bridge releases at the time of the Java SE availability. Both the Java SE and the corresponding Access Bridge have been subsequently updated for stability and improvement of the Oracle suite of products, even though Matlab may not pace itself with these latest releases and stability updates. The table below lists the most recent version of the Java Access Bridge corresponding to the version of the JRE as used by Mathworks products. Note that even though a <br>
slightly lower version of the Java Access Bridge may be used, performance, speed and stability are best preserved when the latest recommended release of the Java Access Bridge are installed and enabled. <br>
Matlab JRE version Java Access Bridge latest stable version<br>
1.6.0_<update> 2.0.2<br>
1.5.0_<update> 2.0.1<br>
1.4.0_<update> 1.2<br>
1.3.0_<update> 1.0.4<br>
Table 1: Versions of the jabswitch corresponding to the Matlab JRE. Note that the JRE is dependent on the version of Matlab on the system<br>
<br>
As explained above, the command “version –java” can yield information about the JRE used by Matlab for a given installation.<br>
<br>
It is also important to note that some older versions of Jaws may not correctly function for the versions of Matlab and jabswitch beyond their scope. Consult the Freedom Scientific pages if in doubt. It must also be noted that the system wide installation of the Java Access Bridge links to any application dependent on earlier versions of the jabswitch, and therefore there is no need to amend the special properties files under the name “accessibility.properties” as described in the official Mathworks documentation. The system wide implementation of version 2.0.3 already takes care of this step and the file that is prebundled with this name is sufficient to rely on the dependence of backward compatibility.<br>
<br>
To manually install the version relevant to the Matlab JRE, follow these steps:<br>
1. Download the relevant version of the Java Access Bridge from the Oracle website<br>
2. Unpack the installation, and copy the listed files into the locations described in Table 2. For 32 bit versions of the JRE, download and install the 32 bit version of the jabswitch and for 64 bit versions of the JRE, install the 64 bit versions of the Java Access Bridge. If a 64 bit version of the jabswitch is not available, download the latest prior release.<br>
3. For a 64 bit installation, follow these steps as outlined in the Bug Report#739518 <br>
<br>
FileName Destination<br>
WindowsAccessBridge64.dll matlabroot\bin\win64 <br>
JavaAccessBridge64.dll matlabroot\sys\java\jre\win64\jre\bin <br>
JAWTAccessBridge64.dll matlabroot\sys\java\jre\win64\jre\bin <br>
accessibility.properties matlabroot\sys\java\jre\win64\jre\lib <br>
accessbridge64.jar matlabroot\sys\java\jre\win64\jre\lib\ext <br>
jaccess.jar matlabroot\sys\java\jre\win64\jre\lib\ext <br>
Table 2: The installation instructions for jabswitch<br>
<br>
<br>
4. Following the above steps, restart Matlab.<br>
5. Press ALT+F to hear the output of Jaws. Explore the menus with the arrow keys. If the menu is audible, the installation has been successful and Matlab is now ready to be used with Jaws. For 32 bit versions, substitute win64 in the above with sys32 /win32 instead, and copy the 32 bit file versions instead<br>
<br>
<br>
Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window<br>
The final step required to make Matlab accessible with Jaws is to decouple Matlab keyboard commands which cause conflict with Jaws’s reading keystrokes. Furthermore, for users of Jaws, it is important to allow keyboard access to easily navigate around the command window to obtain the output of the entered command, i.e. to allow Jaws to read the output on the command window. The up and down arrow keys in this work are being designated for navigation across the command window. Further, the CTRL+up and CTRL+down combinations, used for the previous and next command in the history buffer are in direct conflict with the Jaws read line instructions, and in this work, the above commands for Matlab are being altered to CTRL+SHIFT+up and CTRL+SHIFT+down combinations. These can be chosen as per the user’s preference, and can be restored to defaults at any time.<br>
<br>
To enable navigation of the Matlab command window using the arrow keys, and to allow the new combinations to recall commands from the history buffer, copy the following text into a text editor and save it as CustomWindowsSet.xml <br>
<br>
<br>
<?xml version="1.0" encoding="utf8"?><br>
<CustomKeySet derivedfrom="Windows" modifieddefault="false"><br>
<Context id="Global"><br>
<Action id="previoushistoryitem"><br>
<Stroke code="VK_UP" ctrl="on" shift="on"/><br>
<Stroke code="VK_KP_UP" ctrl="on" shift="on"/><br>
</Action><br>
<Action id="nexthistoryitem"><br>
<Stroke code="VK_DOWN" ctrl="on" shift="on"/><br>
<Stroke code="VK_KP_DOWN" ctrl="on" shift="on"/><br>
</Action><br>
</Context><br>
<Context id="CommandWindow"><br>
<Action id="caretup"/><br>
<Action id="caretdown"/><br>
</Context><br>
</CustomKeySet><br>
<br>
<br>
Move this file to the following location:<br>
<br>
C:\Users\<your username>\AppData\Roaming\MathWorks\MATLAB\R2012a<br>
<br>
Then in this location, locate the file “matlab.prf” to edit the system preferences which will now take advantage of the properties defined in CustomWindowsSet.xml – the contents of the file depends on the user’s preferences and may vary from person to person. Open matlab.prf in a text editor and add the following two lines at the end of the file:<br>
<br>
<br>
CustomKeyBindingSets=SCustomWindowsSet.xml<br>
CurrentKeyBindingSet=SCustomWindowsSet.xml<br>
<br>
Save this file in the same location and do not amend the name. Relaunch Matlab. Now type in a few commands, examine the output. If Jaws allows arrow key navigation and the alternative recall of commands in the history window, the exercise has succeeded.<br>
<br>
Please note that the preferences can easily be removed and the system can be restored to defaults at any time. Simply label the above mentioned folder with a different name and relaunch Matlab. The initialisation will appear slightly longer, but during this exercise, Matlab will recreate the preferences to the default set. The old preferences folder can now be deleted or archived.<br>
<br>
Remarks<br>
1. Please note that jabswitch will not function if the JRE version is below 1.3.0<br>
2. The above settings may not work with NVDA or other screen readers. Consult the vendor for instructions<br>
3. This method may not assist with content which is by nature visually inaccessible<br>
4. Do not try to reimplement the version of the JVM through the MATLAB_JAVA system variable. Although this method may update the version of the JVM for use with Matlab, it may affect the performance of jabswitch through conflicts, even if version 2.0.3 is installed system wide. It also impacts some of the inbuilt Matlab tools<br>
5. Mac and Linux users please note that the built in version of Java on these operating systems do not make use of the Java Access Bridge. In fact, to test the accessibility of Matlab on a Mac, test it with VoiceOver and Zoom. On Linux, test it with orca, speak up or EmacSpeak<br>
6. There is no implementation of the jabswitch within the OpenJDK, not even in the latest version, so do not use it to improve or test the accessibility of Matlab’s JRE<br>
7. The list of keyboard conflicts is not exhaustive and may need to be revisited from time to time with updates to Matlab and Jaws<br>
<br>
Conclusion<br>
This has been an attempt to fill in the gap left due to updates of the official Mathworks documentation not maintaining pace with the advent of Windows 7, higher versions of the Java SE, improvements in Jaws as well as the many versions of Matlab that have been released since the last official testing for accessibility has been carried out. It has attempted to provide a stepbystep walk through for allowing Matlab 32 and 64 bit versions to be set up and used by Jaws. It also presents the user to use Matlab without the use of the “diary” or “nojava” flags, thereby allowing equal access to all possible functionality within an academic or industrial testing and development scenarios.<br>
<br>
This solution remains the best possible work around for Matlab with respect to accessibility until Mathworks sufficiently updates its Java to 1.7.0_06 or higher. Note that although all possible effort has been taken here to maintain accuracy, the author shall in no way be deemed liable or responsible for any loss or damage, including financialor physical loss from the use of advise presented here in.<br>
<br>
Acknowledgements<br>
Special thanks are due to the Mathworks Technical Support Team for assistance in implementation of this solution and without their effort, this work may have not been possible. <br>
<br>
References<br>
1. Freedom Scientific Home Page: <a href="http://www.freedomscientific.com">http://www.freedomscientific.com</a><br>
2. Java Archives Download Page: <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html">http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html</a><br>
3. Matlab Bug Report: <a href="http://www.mathworks.co.uk/support/bugreports/739518">http://www.mathworks.co.uk/support/bugreports/739518</a>

Fri, 12 Jul 2013 21:00:13 +0000
Re: How to Configure Matlab to Work with Jaws Screen Reader
http://www.mathworks.com/matlabcentral/newsreader/view_thread/323327#908084
mohd atif
Hi,<br>
I need a little more help in understanding these steps. <br>
Kindly help me out.<br>
First, in the Environment/System/Path variable, where we have to add the path? In the beginning or at the end?<br>
"Muzzamil Lakhani" wrote in message <k3qm5r$cdr$1@newscl01ah.mathworks.com>...<br>
> How to Setup and Use Matlab With Jaws<br>
> <br>
> The problem of accessibility within Matlab with Jaws arises due to the presence of Java within Matlab, which does not come preenabled with the accessibility fix known as Java Access Bridge (jabswitch). Oracle has, as of Java v1.7.0_06 and above, started to ship the Access Bridge prebundled with the installation of Java. At the time of writing, the latest version of the Access Bridge stands at 2.0.3 – and the purpose of the Access Bridge is to allow Java based applications to provide testing and use of otherwise inaccessible GUI components of programmes. <br>
> <br>
> This method of enabling accessibility with Jaws has been tested using Matlab R2012a 64 bit with Jaws 12 (64 bit) on Windows 7 Professional SP1 (64 bit) on a machine having the following hardware specifications:<br>
> an Intel Core2Dual i7 2.7GHz processor with 8GB RAM, having Oracle JDK 1.7.0_07 64 bit and the Java access Bridge stands at 2.0.3 and is enabled system wide. The hardware is a 13 inch Macbook Pro early 2011 which has been upgraded to Mac OS 10.8.1 .<br>
> <br>
> The installation of Oracle JDK 1.7.0_07, even with jabswitch v2.0.3 enabled does not resolve the issues of accessibility of Matlab with Jaws because Matlab uses its own inbuilt version of Java, which still stands at 1.6.0_17, and the Java has not yet been updated to 1.7.0 even after the release of Matlab R2012b. Therefore, in order to allow the functionality of jabswitch on Matlab, a version of the appropriate Access Bridge manually needs to be installed corresponding to the version of Java on Matlab.<br>
> <br>
> This work describes in detail the procedure for optimising the accessibility of Matlab’s menu bars and command window with Jaws. This method has been tested for backward compatibility with R2011a 32bit using Jaws 11 64 bit on Windows XP Professional 64 bit, where JDK 1.7.0_01 was made to work with a manual system wide installation of jabswitch 2.0.2 and this method will probably also work with earlier versions of Matlab and Jaws together, regardless of computer architecture. This document is intended to fill the gap in the lack of accessibility notes in the installation and testing of Matlab, which at the time of writing, has official instructions only up to a Jaws version 7, released long before the advent of Windows 7. Official documentation at this time does not delve into the version of Matlab used to test this architecture, nor is there any information on the accessibility of 64 <br>
bit <br>
> versions of Matlab products. <br>
> <br>
> Summary of Steps to make Matlab accessible with Jaws<br>
> This section lists the steps required to allow users and developers alike to test Matlab installation with Jaws the <br>
> 1. Check the architecture of the Operating System<br>
> 2. Install Jaws<br>
> 3. Install Oracle JDK 1.7.0_06 or higher<br>
> 4. Enable Java Access Bridge on a system wide basis<br>
> 5. Install Matlab<br>
> 6. Set Path of relevant libraries necessary to link to Jaws<br>
> 7. Manually install the appropriate Java Access Bridge to work with Matlab Java<br>
> 8. Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window<br>
> <br>
> Please note: Steps 25 can be performed in any order of preference. This flexibility not only allows users of Jaws to work with Matlab, but also allows developers of Java and Matlab based applications to test their products for compliance with the necessary accessibility requirements. The following sections describe in details all the above steps, in an attempt to provide a walk through the process.<br>
> <br>
> <br>
> Check the Architecture of the Operating System<br>
> Generally this information is available at the point of installation of Windows. It can be obtained not only from the initial product documentation, but also from the command prompt. To obtain the architecture, type the following into the Command Prompt:<br>
> <br>
> >comparch –<br>
> <br>
> Output: <br>
> I386: 32 bit<br>
> I686 / x64: 64 bit<br>
> <br>
> This information is vital as it is the most important factor in the precedence chain to determine the version of Java, Jaws and Matlab that will effectively work together for best accessibility results. The chain of precedence, in order of most important factor first, is as follows:<br>
> a. Windows Architecture (64  32 bit)<br>
> b. Jaws (64  32 bit)<br>
> c. JDK SE7 U6+ (64 32 bit)<br>
> d. Java Access Bridge (64  32 bit)<br>
> e. Matlab architecture (or more precisely, the Matlab JVM architecture) (64  32 bit)<br>
> From the above, it is evident to see that if at any point during the chain, a lower bit version is used, all the proceeding factors cannot be a higher bit architecture. For example, if the Jaws used is a 32 bit version, then JDK, jabswitch and Matlab must all be 32 bit if this solution is to work. At any point along this chain however, it is possible to move to a lower bit version, but all subsequent factors must then be lower bit architectures as well.<br>
> <br>
> Install Jaws<br>
> A demo version, allowing 40 minutes of access at a time (before the machine would require a restart for it to function again) can be downloaded free of charge from the Freedom Scientific Website: <a href="http://www.freedomscientific.com">http://www.freedomscientific.com</a> where a full version can also be purchased. For best performance, it is always recommended that the latest version of Jaws be used for application interaction and development testing. Please also note that although Jaws 11 is available in a 64 bit version, it will only work best with a 32 bit Matlab architecture. In order to test the full capability of Matlab 64 bit, a 64 bit version of Jaws 12 or higher is required. If Jaws licensing is setup on a network, ensure that the system PATH variable points to the location of the Jaws network. <br>
> <br>
> It is possible to have multiple versions of Jaws simultaneously installed on a single computer. However, only one instance of Jaws can run at any given time. <br>
> <br>
> Install Oracle JDK 1.7.0_06 or higher<br>
> Oracle has officially stopped maintaining JDK SE 6 and encourages users to upgrade their Java to SE7 Update 6 or higher for best performance, improved stability and some important security fixes. This is also the recommendation if the system only has a public Java Runtime Environment (jre7). Java SE 7 is interchangeably referred to as 1.7.0 and in order to install and run Matlab, JDK is not a prerequisite, although having a JDK does allow much better functionality as well as appropriate tools for Java development. Instructions for installing the JRE are listed on the Oracle Java Page <a href="http://java.sun.com">http://java.sun.com</a> along with those for installing the JDK. The page also provides links to the latest Java downloads. <br>
> <br>
> Although the installation procedure is similar, this work concentrates mainly on the use of JDK. After downloading the installer package, just run the setup and follow the onscreen instructions. When the installer finishes, set the PATH to Java for convenience by following these steps:<br>
> 1. Either enter within the Search field within the Start Menu the words “environment variables” or locate it through Control Panel, depending on the version of Windows<br>
> 2. Locate the “Edit System Environment Variables” button<br>
> 3. Add the following to the end of the PATH variable (if the existing line does not have a semicolon (;) add one and then type the PATH to the Java Installation). For most users, this normally looks like:<br>
> <br>
> C:\Program Files\Java\jdk1.7.0_07\bin;<br>
> <br>
> If the Java is installed in a different location, locate the bin folder within the Java JDK directory. System privileges must allow for this step to be carried out<br>
> 4. Restart the system<br>
> 5. To test the setup of Java, enter the following command in the Command Prompt:<br>
> <br>
> >java –version<br>
> Although multiple instances of Java are allowed on a machine, it is always best to install the version corresponding to the Computer’s architecture<br>
> 6. If any custom scripts have been installed on Jaws, just recompile the default.jss file within Jaws (do not amend anything) and save the result<br>
> 7. Restart Jaws (if installed and running)<br>
> <br>
> Installation of Java prior to Matlab installation improves the setup and initialisation of Matlab and also provides better accessibility to the Matlab online documentation.<br>
> <br>
> Enabling the Java Access Bridge on a System Wide basis<br>
> Java SE 7U6 and above come bundled with the Java Access Bridge, allowing users to enable it for all GUI applications without having to perform a complicated set of copypasting of files to locations buried deep within the Java hierarchy. To enable Java Access Bridge:<br>
> 1. press WIN+u to launch the Ease of Access Centre<br>
> 2. Navigate to “Use the Computer Without A Display”<br>
> 3. Check the box “Enable Java Access Bridge”<br>
> 4. Click OK<br>
> 5. Restart for good measure<br>
> Alternatively, to enable Java Access Bridge from the Command Line, open the Command Prompt, navigate to the folder corresponding to the Java PATH variable and type the following:<br>
> <br>
> >jabswitch –enable<br>
> <br>
> The output should inform that the jabswitch has been enabled. To enable Java Access Bridge for all users, repeat the above steps for each user.<br>
> <br>
> If multiple instances of Java are installed on a system, the above steps for enabling the jabswitch via the Command prompt must be repeated for each instance of the JDK. If using Jaws, Freedom Scientific discourages using multiple instances of the Java Access Bridge simultaneously. For optimal performance and speed, it is recommended that If using a 64 bit instance of the JDK, users should also install the jre7 32 bit version to allow better access to the Matlab online documentation and help on a range of browsers. <br>
> <br>
> Installing Matlab<br>
> Install the relevant version of Matlab either from the installation media or from the Mathworks website <a href="http://www.mathworks.com">http://www.mathworks.com</a> and restart the system. Launch the application after launching Jaws. Once the Matlab Command Window has launched, try navigating to the menu bar by pressing ALT+F. Navigate left and right to explore the menus, and notice that Jaws does not announce anything at this point. This is because of the presence of Matlab’s own JRE, which is a separate entity from the system Java and differs in version. To make the Matlab Java work with the accessibility features, the relevant Java Access Bridge needs to be installed.<br>
> <br>
> On the Matlab Command Window, type the following commands and record the outputs for later use:<br>
> <br>
> >matlabroot<br>
> <br>
> >version –java<br>
> <br>
> These commands list the installation of the Matlab structure, and also the version of JRE used by the installed Matlab on the system. <br>
> <br>
> Typical values of the above commands may look something as follows (exact dvalues depend on the system installation and version of Matlab):<br>
> <br>
> >matlabroot<br>
> <br>
> Ans= C:\Program Files\Matlab\R2012a <br>
> <br>
> >version –java<br>
> <br>
> Ans= <br>
> Java 1.6.0_17b04 with Sun Microsystems Inc. Java HotSpot(TM) 64Bit Server VM mixed mode<br>
> <br>
> <br>
> These will be required in the following sections. Notice the 64 bit indication of Java from the above output, indicating that the installed Matlab, and its JRE are indeed 64 bit, and will therefore require a 64 bit Java Access Bridge and will work best with a Jaws that is also 64 bit, as explained in the precedence chain above. For 32 bit versions of Matlab, a 32 bit Java Access Bridge needs to be installed as expected. <br>
> <br>
> It is important to note that:<br>
> 1. Installing a 64 bit version of the Java Access Bridge on a 32 bit Matlab Java will not work with Jaws, and might hinder the program’s performance. <br>
> 2. Installing a 32 bit Java Access bridge on a 64 bit version of Matlab will only allow partially improved accessibility, and there is no guarantee of this.<br>
> At this point, it is important to be reminded that enabling the Java Access Bridge v2.0.3 with JDK SE 7 system wide would certainly improve Matlab’s download and installation performance, and also allow Jaws to add Matlab related scripts in the default.jss file. In addition, it will also improve the accessibility of other Java based programs, improve the performance of Jaws and also provide means to test and future proof any Java based applications developed using Matlab for use with other third party utilities.<br>
> <br>
> Set Path of relevant libraries necessary to link to Jaws<br>
> If Matlab and Jaws are installed simultaneously, there are certain libraries that allow Matlab to link to the built in functionality of Jaws. To set the launch of these libraries, simply include the following line to the end of the PATH system environment variable (Do not forget to include the ; at the end of this – it is imperative in this case):<br>
> <br>
> For a 64 bit Matlab:<br>
> Matlabroot\bin\win64; <br>
> <br>
> For a 32 bit Matlab:<br>
> Matlabroot\bin\sys32;<br>
> <br>
> The matlabroot is the value obtained above. Note that the coexistence of Matlab and Jaws does not impair performance, and disabling or quitting Jaws will still allow the user to use Matlab effectively following a relaunch of Matlab. Additionally, in order to develop accessible applications using Matlab and it’s compiler, set the following PATH variable:<br>
> For a 64 bit system:<br>
> Matlabroot\runtime\win64\ <br>
> <br>
> For a 32 bit system:<br>
> Matlabroot\runtime\sys32\<br>
> <br>
> For reasons not fully understood, enabling both the above as PATH variables, the overall improvement of Matlab’s start up window is improved. However, there is still no Java Access Bridge on the Matlab JRE. The following section describes this installation procedure, which for earlier versions of the Java SE can also be used for the system wide installation of the Java Access Bridge.<br>
> <br>
> Manually install the appropriate Java Access Bridge to work with Matlab Java<br>
> Download the relevant version of the Java Access Bridge from the Oracle Java Archives Download Page: <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html">http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html</a> and follow the instructions relevant for the specific version of the Matlab JRE. The reason for the choice of the Java Access Bridge downloads is the different versions of the JVM releases, and the corresponding Java Access Bridge releases at the time of the Java SE availability. Both the Java SE and the corresponding Access Bridge have been subsequently updated for stability and improvement of the Oracle suite of products, even though Matlab may not pace itself with these latest releases and stability updates. The table below lists the most recent version of the Java Access Bridge corresponding to the version of the JRE as used by Mathworks products. Note that even though a <br>
> slightly lower version of the Java Access Bridge may be used, performance, speed and stability are best preserved when the latest recommended release of the Java Access Bridge are installed and enabled. <br>
> Matlab JRE version Java Access Bridge latest stable version<br>
> 1.6.0_<update> 2.0.2<br>
> 1.5.0_<update> 2.0.1<br>
> 1.4.0_<update> 1.2<br>
> 1.3.0_<update> 1.0.4<br>
> Table 1: Versions of the jabswitch corresponding to the Matlab JRE. Note that the JRE is dependent on the version of Matlab on the system<br>
> <br>
> As explained above, the command “version –java” can yield information about the JRE used by Matlab for a given installation.<br>
> <br>
> It is also important to note that some older versions of Jaws may not correctly function for the versions of Matlab and jabswitch beyond their scope. Consult the Freedom Scientific pages if in doubt. It must also be noted that the system wide installation of the Java Access Bridge links to any application dependent on earlier versions of the jabswitch, and therefore there is no need to amend the special properties files under the name “accessibility.properties” as described in the official Mathworks documentation. The system wide implementation of version 2.0.3 already takes care of this step and the file that is prebundled with this name is sufficient to rely on the dependence of backward compatibility.<br>
> <br>
> To manually install the version relevant to the Matlab JRE, follow these steps:<br>
> 1. Download the relevant version of the Java Access Bridge from the Oracle website<br>
> 2. Unpack the installation, and copy the listed files into the locations described in Table 2. For 32 bit versions of the JRE, download and install the 32 bit version of the jabswitch and for 64 bit versions of the JRE, install the 64 bit versions of the Java Access Bridge. If a 64 bit version of the jabswitch is not available, download the latest prior release.<br>
> 3. For a 64 bit installation, follow these steps as outlined in the Bug Report#739518 <br>
> <br>
> FileName Destination<br>
> WindowsAccessBridge64.dll matlabroot\bin\win64 <br>
> JavaAccessBridge64.dll matlabroot\sys\java\jre\win64\jre\bin <br>
> JAWTAccessBridge64.dll matlabroot\sys\java\jre\win64\jre\bin <br>
> accessibility.properties matlabroot\sys\java\jre\win64\jre\lib <br>
> accessbridge64.jar matlabroot\sys\java\jre\win64\jre\lib\ext <br>
> jaccess.jar matlabroot\sys\java\jre\win64\jre\lib\ext <br>
> Table 2: The installation instructions for jabswitch<br>
> <br>
> <br>
> 4. Following the above steps, restart Matlab.<br>
> 5. Press ALT+F to hear the output of Jaws. Explore the menus with the arrow keys. If the menu is audible, the installation has been successful and Matlab is now ready to be used with Jaws. For 32 bit versions, substitute win64 in the above with sys32 /win32 instead, and copy the 32 bit file versions instead<br>
> <br>
> <br>
> Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window<br>
> The final step required to make Matlab accessible with Jaws is to decouple Matlab keyboard commands which cause conflict with Jaws’s reading keystrokes. Furthermore, for users of Jaws, it is important to allow keyboard access to easily navigate around the command window to obtain the output of the entered command, i.e. to allow Jaws to read the output on the command window. The up and down arrow keys in this work are being designated for navigation across the command window. Further, the CTRL+up and CTRL+down combinations, used for the previous and next command in the history buffer are in direct conflict with the Jaws read line instructions, and in this work, the above commands for Matlab are being altered to CTRL+SHIFT+up and CTRL+SHIFT+down combinations. These can be chosen as per the user’s preference, and can be restored to defaults at any time.<br>
> <br>
> To enable navigation of the Matlab command window using the arrow keys, and to allow the new combinations to recall commands from the history buffer, copy the following text into a text editor and save it as CustomWindowsSet.xml <br>
> <br>
> <br>
> <?xml version="1.0" encoding="utf8"?><br>
> <CustomKeySet derivedfrom="Windows" modifieddefault="false"><br>
> <Context id="Global"><br>
> <Action id="previoushistoryitem"><br>
> <Stroke code="VK_UP" ctrl="on" shift="on"/><br>
> <Stroke code="VK_KP_UP" ctrl="on" shift="on"/><br>
> </Action><br>
> <Action id="nexthistoryitem"><br>
> <Stroke code="VK_DOWN" ctrl="on" shift="on"/><br>
> <Stroke code="VK_KP_DOWN" ctrl="on" shift="on"/><br>
> </Action><br>
> </Context><br>
> <Context id="CommandWindow"><br>
> <Action id="caretup"/><br>
> <Action id="caretdown"/><br>
> </Context><br>
> </CustomKeySet><br>
> <br>
> <br>
> Move this file to the following location:<br>
> <br>
> C:\Users\<your username>\AppData\Roaming\MathWorks\MATLAB\R2012a<br>
> <br>
> Then in this location, locate the file “matlab.prf” to edit the system preferences which will now take advantage of the properties defined in CustomWindowsSet.xml – the contents of the file depends on the user’s preferences and may vary from person to person. Open matlab.prf in a text editor and add the following two lines at the end of the file:<br>
> <br>
> <br>
> CustomKeyBindingSets=SCustomWindowsSet.xml<br>
> CurrentKeyBindingSet=SCustomWindowsSet.xml<br>
> <br>
> Save this file in the same location and do not amend the name. Relaunch Matlab. Now type in a few commands, examine the output. If Jaws allows arrow key navigation and the alternative recall of commands in the history window, the exercise has succeeded.<br>
> <br>
> Please note that the preferences can easily be removed and the system can be restored to defaults at any time. Simply label the above mentioned folder with a different name and relaunch Matlab. The initialisation will appear slightly longer, but during this exercise, Matlab will recreate the preferences to the default set. The old preferences folder can now be deleted or archived.<br>
> <br>
> Remarks<br>
> 1. Please note that jabswitch will not function if the JRE version is below 1.3.0<br>
> 2. The above settings may not work with NVDA or other screen readers. Consult the vendor for instructions<br>
> 3. This method may not assist with content which is by nature visually inaccessible<br>
> 4. Do not try to reimplement the version of the JVM through the MATLAB_JAVA system variable. Although this method may update the version of the JVM for use with Matlab, it may affect the performance of jabswitch through conflicts, even if version 2.0.3 is installed system wide. It also impacts some of the inbuilt Matlab tools<br>
> 5. Mac and Linux users please note that the built in version of Java on these operating systems do not make use of the Java Access Bridge. In fact, to test the accessibility of Matlab on a Mac, test it with VoiceOver and Zoom. On Linux, test it with orca, speak up or EmacSpeak<br>
> 6. There is no implementation of the jabswitch within the OpenJDK, not even in the latest version, so do not use it to improve or test the accessibility of Matlab’s JRE<br>
> 7. The list of keyboard conflicts is not exhaustive and may need to be revisited from time to time with updates to Matlab and Jaws<br>
> <br>
> Conclusion<br>
> This has been an attempt to fill in the gap left due to updates of the official Mathworks documentation not maintaining pace with the advent of Windows 7, higher versions of the Java SE, improvements in Jaws as well as the many versions of Matlab that have been released since the last official testing for accessibility has been carried out. It has attempted to provide a stepbystep walk through for allowing Matlab 32 and 64 bit versions to be set up and used by Jaws. It also presents the user to use Matlab without the use of the “diary” or “nojava” flags, thereby allowing equal access to all possible functionality within an academic or industrial testing and development scenarios.<br>
> <br>
> This solution remains the best possible work around for Matlab with respect to accessibility until Mathworks sufficiently updates its Java to 1.7.0_06 or higher. Note that although all possible effort has been taken here to maintain accuracy, the author shall in no way be deemed liable or responsible for any loss or damage, including financialor physical loss from the use of advise presented here in.<br>
> <br>
> Acknowledgements<br>
> Special thanks are due to the Mathworks Technical Support Team for assistance in implementation of this solution and without their effort, this work may have not been possible. <br>
> <br>
> References<br>
> 1. Freedom Scientific Home Page: <a href="http://www.freedomscientific.com">http://www.freedomscientific.com</a><br>
> 2. Java Archives Download Page: <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html">http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html</a><br>
> 3. Matlab Bug Report: <a href="http://www.mathworks.co.uk/support/bugreports/739518">http://www.mathworks.co.uk/support/bugreports/739518</a>

Wed, 20 Nov 2013 00:24:16 +0000
Re: How to Configure Matlab to Work with Jaws Screen Reader
http://www.mathworks.com/matlabcentral/newsreader/view_thread/323327#914374
Amy
I would like to know if there is an update to these instructions for R2013b? I believe the current version of the Java Access Bridge is bundled with this version of Matlab? Therefore, are the steps different for setting up matlab to work with Jaws (v. 14).<br>
<br>
"Muzzamil Lakhani" wrote in message <k3qm5r$cdr$1@newscl01ah.mathworks.com>...<br>
> How to Setup and Use Matlab With Jaws<br>
> <br>
> The problem of accessibility within Matlab with Jaws arises due to the presence of Java within Matlab, which does not come preenabled with the accessibility fix known as Java Access Bridge (jabswitch). Oracle has, as of Java v1.7.0_06 and above, started to ship the Access Bridge prebundled with the installation of Java. At the time of writing, the latest version of the Access Bridge stands at 2.0.3 – and the purpose of the Access Bridge is to allow Java based applications to provide testing and use of otherwise inaccessible GUI components of programmes. <br>
> <br>
> This method of enabling accessibility with Jaws has been tested using Matlab R2012a 64 bit with Jaws 12 (64 bit) on Windows 7 Professional SP1 (64 bit) on a machine having the following hardware specifications:<br>
> an Intel Core2Dual i7 2.7GHz processor with 8GB RAM, having Oracle JDK 1.7.0_07 64 bit and the Java access Bridge stands at 2.0.3 and is enabled system wide. The hardware is a 13 inch Macbook Pro early 2011 which has been upgraded to Mac OS 10.8.1 .<br>
> <br>
> The installation of Oracle JDK 1.7.0_07, even with jabswitch v2.0.3 enabled does not resolve the issues of accessibility of Matlab with Jaws because Matlab uses its own inbuilt version of Java, which still stands at 1.6.0_17, and the Java has not yet been updated to 1.7.0 even after the release of Matlab R2012b. Therefore, in order to allow the functionality of jabswitch on Matlab, a version of the appropriate Access Bridge manually needs to be installed corresponding to the version of Java on Matlab.<br>
> <br>
> This work describes in detail the procedure for optimising the accessibility of Matlab’s menu bars and command window with Jaws. This method has been tested for backward compatibility with R2011a 32bit using Jaws 11 64 bit on Windows XP Professional 64 bit, where JDK 1.7.0_01 was made to work with a manual system wide installation of jabswitch 2.0.2 and this method will probably also work with earlier versions of Matlab and Jaws together, regardless of computer architecture. This document is intended to fill the gap in the lack of accessibility notes in the installation and testing of Matlab, which at the time of writing, has official instructions only up to a Jaws version 7, released long before the advent of Windows 7. Official documentation at this time does not delve into the version of Matlab used to test this architecture, nor is there any information on the accessibility of 64 <br>
bit <br>
> versions of Matlab products. <br>
> <br>
> Summary of Steps to make Matlab accessible with Jaws<br>
> This section lists the steps required to allow users and developers alike to test Matlab installation with Jaws the <br>
> 1. Check the architecture of the Operating System<br>
> 2. Install Jaws<br>
> 3. Install Oracle JDK 1.7.0_06 or higher<br>
> 4. Enable Java Access Bridge on a system wide basis<br>
> 5. Install Matlab<br>
> 6. Set Path of relevant libraries necessary to link to Jaws<br>
> 7. Manually install the appropriate Java Access Bridge to work with Matlab Java<br>
> 8. Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window<br>
> <br>
> Please note: Steps 25 can be performed in any order of preference. This flexibility not only allows users of Jaws to work with Matlab, but also allows developers of Java and Matlab based applications to test their products for compliance with the necessary accessibility requirements. The following sections describe in details all the above steps, in an attempt to provide a walk through the process.<br>
> <br>
> <br>
> Check the Architecture of the Operating System<br>
> Generally this information is available at the point of installation of Windows. It can be obtained not only from the initial product documentation, but also from the command prompt. To obtain the architecture, type the following into the Command Prompt:<br>
> <br>
> >comparch –<br>
> <br>
> Output: <br>
> I386: 32 bit<br>
> I686 / x64: 64 bit<br>
> <br>
> This information is vital as it is the most important factor in the precedence chain to determine the version of Java, Jaws and Matlab that will effectively work together for best accessibility results. The chain of precedence, in order of most important factor first, is as follows:<br>
> a. Windows Architecture (64  32 bit)<br>
> b. Jaws (64  32 bit)<br>
> c. JDK SE7 U6+ (64 32 bit)<br>
> d. Java Access Bridge (64  32 bit)<br>
> e. Matlab architecture (or more precisely, the Matlab JVM architecture) (64  32 bit)<br>
> From the above, it is evident to see that if at any point during the chain, a lower bit version is used, all the proceeding factors cannot be a higher bit architecture. For example, if the Jaws used is a 32 bit version, then JDK, jabswitch and Matlab must all be 32 bit if this solution is to work. At any point along this chain however, it is possible to move to a lower bit version, but all subsequent factors must then be lower bit architectures as well.<br>
> <br>
> Install Jaws<br>
> A demo version, allowing 40 minutes of access at a time (before the machine would require a restart for it to function again) can be downloaded free of charge from the Freedom Scientific Website: <a href="http://www.freedomscientific.com">http://www.freedomscientific.com</a> where a full version can also be purchased. For best performance, it is always recommended that the latest version of Jaws be used for application interaction and development testing. Please also note that although Jaws 11 is available in a 64 bit version, it will only work best with a 32 bit Matlab architecture. In order to test the full capability of Matlab 64 bit, a 64 bit version of Jaws 12 or higher is required. If Jaws licensing is setup on a network, ensure that the system PATH variable points to the location of the Jaws network. <br>
> <br>
> It is possible to have multiple versions of Jaws simultaneously installed on a single computer. However, only one instance of Jaws can run at any given time. <br>
> <br>
> Install Oracle JDK 1.7.0_06 or higher<br>
> Oracle has officially stopped maintaining JDK SE 6 and encourages users to upgrade their Java to SE7 Update 6 or higher for best performance, improved stability and some important security fixes. This is also the recommendation if the system only has a public Java Runtime Environment (jre7). Java SE 7 is interchangeably referred to as 1.7.0 and in order to install and run Matlab, JDK is not a prerequisite, although having a JDK does allow much better functionality as well as appropriate tools for Java development. Instructions for installing the JRE are listed on the Oracle Java Page <a href="http://java.sun.com">http://java.sun.com</a> along with those for installing the JDK. The page also provides links to the latest Java downloads. <br>
> <br>
> Although the installation procedure is similar, this work concentrates mainly on the use of JDK. After downloading the installer package, just run the setup and follow the onscreen instructions. When the installer finishes, set the PATH to Java for convenience by following these steps:<br>
> 1. Either enter within the Search field within the Start Menu the words “environment variables” or locate it through Control Panel, depending on the version of Windows<br>
> 2. Locate the “Edit System Environment Variables” button<br>
> 3. Add the following to the end of the PATH variable (if the existing line does not have a semicolon (;) add one and then type the PATH to the Java Installation). For most users, this normally looks like:<br>
> <br>
> C:\Program Files\Java\jdk1.7.0_07\bin;<br>
> <br>
> If the Java is installed in a different location, locate the bin folder within the Java JDK directory. System privileges must allow for this step to be carried out<br>
> 4. Restart the system<br>
> 5. To test the setup of Java, enter the following command in the Command Prompt:<br>
> <br>
> >java –version<br>
> Although multiple instances of Java are allowed on a machine, it is always best to install the version corresponding to the Computer’s architecture<br>
> 6. If any custom scripts have been installed on Jaws, just recompile the default.jss file within Jaws (do not amend anything) and save the result<br>
> 7. Restart Jaws (if installed and running)<br>
> <br>
> Installation of Java prior to Matlab installation improves the setup and initialisation of Matlab and also provides better accessibility to the Matlab online documentation.<br>
> <br>
> Enabling the Java Access Bridge on a System Wide basis<br>
> Java SE 7U6 and above come bundled with the Java Access Bridge, allowing users to enable it for all GUI applications without having to perform a complicated set of copypasting of files to locations buried deep within the Java hierarchy. To enable Java Access Bridge:<br>
> 1. press WIN+u to launch the Ease of Access Centre<br>
> 2. Navigate to “Use the Computer Without A Display”<br>
> 3. Check the box “Enable Java Access Bridge”<br>
> 4. Click OK<br>
> 5. Restart for good measure<br>
> Alternatively, to enable Java Access Bridge from the Command Line, open the Command Prompt, navigate to the folder corresponding to the Java PATH variable and type the following:<br>
> <br>
> >jabswitch –enable<br>
> <br>
> The output should inform that the jabswitch has been enabled. To enable Java Access Bridge for all users, repeat the above steps for each user.<br>
> <br>
> If multiple instances of Java are installed on a system, the above steps for enabling the jabswitch via the Command prompt must be repeated for each instance of the JDK. If using Jaws, Freedom Scientific discourages using multiple instances of the Java Access Bridge simultaneously. For optimal performance and speed, it is recommended that If using a 64 bit instance of the JDK, users should also install the jre7 32 bit version to allow better access to the Matlab online documentation and help on a range of browsers. <br>
> <br>
> Installing Matlab<br>
> Install the relevant version of Matlab either from the installation media or from the Mathworks website <a href="http://www.mathworks.com">http://www.mathworks.com</a> and restart the system. Launch the application after launching Jaws. Once the Matlab Command Window has launched, try navigating to the menu bar by pressing ALT+F. Navigate left and right to explore the menus, and notice that Jaws does not announce anything at this point. This is because of the presence of Matlab’s own JRE, which is a separate entity from the system Java and differs in version. To make the Matlab Java work with the accessibility features, the relevant Java Access Bridge needs to be installed.<br>
> <br>
> On the Matlab Command Window, type the following commands and record the outputs for later use:<br>
> <br>
> >matlabroot<br>
> <br>
> >version –java<br>
> <br>
> These commands list the installation of the Matlab structure, and also the version of JRE used by the installed Matlab on the system. <br>
> <br>
> Typical values of the above commands may look something as follows (exact dvalues depend on the system installation and version of Matlab):<br>
> <br>
> >matlabroot<br>
> <br>
> Ans= C:\Program Files\Matlab\R2012a <br>
> <br>
> >version –java<br>
> <br>
> Ans= <br>
> Java 1.6.0_17b04 with Sun Microsystems Inc. Java HotSpot(TM) 64Bit Server VM mixed mode<br>
> <br>
> <br>
> These will be required in the following sections. Notice the 64 bit indication of Java from the above output, indicating that the installed Matlab, and its JRE are indeed 64 bit, and will therefore require a 64 bit Java Access Bridge and will work best with a Jaws that is also 64 bit, as explained in the precedence chain above. For 32 bit versions of Matlab, a 32 bit Java Access Bridge needs to be installed as expected. <br>
> <br>
> It is important to note that:<br>
> 1. Installing a 64 bit version of the Java Access Bridge on a 32 bit Matlab Java will not work with Jaws, and might hinder the program’s performance. <br>
> 2. Installing a 32 bit Java Access bridge on a 64 bit version of Matlab will only allow partially improved accessibility, and there is no guarantee of this.<br>
> At this point, it is important to be reminded that enabling the Java Access Bridge v2.0.3 with JDK SE 7 system wide would certainly improve Matlab’s download and installation performance, and also allow Jaws to add Matlab related scripts in the default.jss file. In addition, it will also improve the accessibility of other Java based programs, improve the performance of Jaws and also provide means to test and future proof any Java based applications developed using Matlab for use with other third party utilities.<br>
> <br>
> Set Path of relevant libraries necessary to link to Jaws<br>
> If Matlab and Jaws are installed simultaneously, there are certain libraries that allow Matlab to link to the built in functionality of Jaws. To set the launch of these libraries, simply include the following line to the end of the PATH system environment variable (Do not forget to include the ; at the end of this – it is imperative in this case):<br>
> <br>
> For a 64 bit Matlab:<br>
> Matlabroot\bin\win64; <br>
> <br>
> For a 32 bit Matlab:<br>
> Matlabroot\bin\sys32;<br>
> <br>
> The matlabroot is the value obtained above. Note that the coexistence of Matlab and Jaws does not impair performance, and disabling or quitting Jaws will still allow the user to use Matlab effectively following a relaunch of Matlab. Additionally, in order to develop accessible applications using Matlab and it’s compiler, set the following PATH variable:<br>
> For a 64 bit system:<br>
> Matlabroot\runtime\win64\ <br>
> <br>
> For a 32 bit system:<br>
> Matlabroot\runtime\sys32\<br>
> <br>
> For reasons not fully understood, enabling both the above as PATH variables, the overall improvement of Matlab’s start up window is improved. However, there is still no Java Access Bridge on the Matlab JRE. The following section describes this installation procedure, which for earlier versions of the Java SE can also be used for the system wide installation of the Java Access Bridge.<br>
> <br>
> Manually install the appropriate Java Access Bridge to work with Matlab Java<br>
> Download the relevant version of the Java Access Bridge from the Oracle Java Archives Download Page: <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html">http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html</a> and follow the instructions relevant for the specific version of the Matlab JRE. The reason for the choice of the Java Access Bridge downloads is the different versions of the JVM releases, and the corresponding Java Access Bridge releases at the time of the Java SE availability. Both the Java SE and the corresponding Access Bridge have been subsequently updated for stability and improvement of the Oracle suite of products, even though Matlab may not pace itself with these latest releases and stability updates. The table below lists the most recent version of the Java Access Bridge corresponding to the version of the JRE as used by Mathworks products. Note that even though a <br>
> slightly lower version of the Java Access Bridge may be used, performance, speed and stability are best preserved when the latest recommended release of the Java Access Bridge are installed and enabled. <br>
> Matlab JRE version Java Access Bridge latest stable version<br>
> 1.6.0_<update> 2.0.2<br>
> 1.5.0_<update> 2.0.1<br>
> 1.4.0_<update> 1.2<br>
> 1.3.0_<update> 1.0.4<br>
> Table 1: Versions of the jabswitch corresponding to the Matlab JRE. Note that the JRE is dependent on the version of Matlab on the system<br>
> <br>
> As explained above, the command “version –java” can yield information about the JRE used by Matlab for a given installation.<br>
> <br>
> It is also important to note that some older versions of Jaws may not correctly function for the versions of Matlab and jabswitch beyond their scope. Consult the Freedom Scientific pages if in doubt. It must also be noted that the system wide installation of the Java Access Bridge links to any application dependent on earlier versions of the jabswitch, and therefore there is no need to amend the special properties files under the name “accessibility.properties” as described in the official Mathworks documentation. The system wide implementation of version 2.0.3 already takes care of this step and the file that is prebundled with this name is sufficient to rely on the dependence of backward compatibility.<br>
> <br>
> To manually install the version relevant to the Matlab JRE, follow these steps:<br>
> 1. Download the relevant version of the Java Access Bridge from the Oracle website<br>
> 2. Unpack the installation, and copy the listed files into the locations described in Table 2. For 32 bit versions of the JRE, download and install the 32 bit version of the jabswitch and for 64 bit versions of the JRE, install the 64 bit versions of the Java Access Bridge. If a 64 bit version of the jabswitch is not available, download the latest prior release.<br>
> 3. For a 64 bit installation, follow these steps as outlined in the Bug Report#739518 <br>
> <br>
> FileName Destination<br>
> WindowsAccessBridge64.dll matlabroot\bin\win64 <br>
> JavaAccessBridge64.dll matlabroot\sys\java\jre\win64\jre\bin <br>
> JAWTAccessBridge64.dll matlabroot\sys\java\jre\win64\jre\bin <br>
> accessibility.properties matlabroot\sys\java\jre\win64\jre\lib <br>
> accessbridge64.jar matlabroot\sys\java\jre\win64\jre\lib\ext <br>
> jaccess.jar matlabroot\sys\java\jre\win64\jre\lib\ext <br>
> Table 2: The installation instructions for jabswitch<br>
> <br>
> <br>
> 4. Following the above steps, restart Matlab.<br>
> 5. Press ALT+F to hear the output of Jaws. Explore the menus with the arrow keys. If the menu is audible, the installation has been successful and Matlab is now ready to be used with Jaws. For 32 bit versions, substitute win64 in the above with sys32 /win32 instead, and copy the 32 bit file versions instead<br>
> <br>
> <br>
> Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window<br>
> The final step required to make Matlab accessible with Jaws is to decouple Matlab keyboard commands which cause conflict with Jaws’s reading keystrokes. Furthermore, for users of Jaws, it is important to allow keyboard access to easily navigate around the command window to obtain the output of the entered command, i.e. to allow Jaws to read the output on the command window. The up and down arrow keys in this work are being designated for navigation across the command window. Further, the CTRL+up and CTRL+down combinations, used for the previous and next command in the history buffer are in direct conflict with the Jaws read line instructions, and in this work, the above commands for Matlab are being altered to CTRL+SHIFT+up and CTRL+SHIFT+down combinations. These can be chosen as per the user’s preference, and can be restored to defaults at any time.<br>
> <br>
> To enable navigation of the Matlab command window using the arrow keys, and to allow the new combinations to recall commands from the history buffer, copy the following text into a text editor and save it as CustomWindowsSet.xml <br>
> <br>
> <br>
> <?xml version="1.0" encoding="utf8"?><br>
> <CustomKeySet derivedfrom="Windows" modifieddefault="false"><br>
> <Context id="Global"><br>
> <Action id="previoushistoryitem"><br>
> <Stroke code="VK_UP" ctrl="on" shift="on"/><br>
> <Stroke code="VK_KP_UP" ctrl="on" shift="on"/><br>
> </Action><br>
> <Action id="nexthistoryitem"><br>
> <Stroke code="VK_DOWN" ctrl="on" shift="on"/><br>
> <Stroke code="VK_KP_DOWN" ctrl="on" shift="on"/><br>
> </Action><br>
> </Context><br>
> <Context id="CommandWindow"><br>
> <Action id="caretup"/><br>
> <Action id="caretdown"/><br>
> </Context><br>
> </CustomKeySet><br>
> <br>
> <br>
> Move this file to the following location:<br>
> <br>
> C:\Users\<your username>\AppData\Roaming\MathWorks\MATLAB\R2012a<br>
> <br>
> Then in this location, locate the file “matlab.prf” to edit the system preferences which will now take advantage of the properties defined in CustomWindowsSet.xml – the contents of the file depends on the user’s preferences and may vary from person to person. Open matlab.prf in a text editor and add the following two lines at the end of the file:<br>
> <br>
> <br>
> CustomKeyBindingSets=SCustomWindowsSet.xml<br>
> CurrentKeyBindingSet=SCustomWindowsSet.xml<br>
> <br>
> Save this file in the same location and do not amend the name. Relaunch Matlab. Now type in a few commands, examine the output. If Jaws allows arrow key navigation and the alternative recall of commands in the history window, the exercise has succeeded.<br>
> <br>
> Please note that the preferences can easily be removed and the system can be restored to defaults at any time. Simply label the above mentioned folder with a different name and relaunch Matlab. The initialisation will appear slightly longer, but during this exercise, Matlab will recreate the preferences to the default set. The old preferences folder can now be deleted or archived.<br>
> <br>
> Remarks<br>
> 1. Please note that jabswitch will not function if the JRE version is below 1.3.0<br>
> 2. The above settings may not work with NVDA or other screen readers. Consult the vendor for instructions<br>
> 3. This method may not assist with content which is by nature visually inaccessible<br>
> 4. Do not try to reimplement the version of the JVM through the MATLAB_JAVA system variable. Although this method may update the version of the JVM for use with Matlab, it may affect the performance of jabswitch through conflicts, even if version 2.0.3 is installed system wide. It also impacts some of the inbuilt Matlab tools<br>
> 5. Mac and Linux users please note that the built in version of Java on these operating systems do not make use of the Java Access Bridge. In fact, to test the accessibility of Matlab on a Mac, test it with VoiceOver and Zoom. On Linux, test it with orca, speak up or EmacSpeak<br>
> 6. There is no implementation of the jabswitch within the OpenJDK, not even in the latest version, so do not use it to improve or test the accessibility of Matlab’s JRE<br>
> 7. The list of keyboard conflicts is not exhaustive and may need to be revisited from time to time with updates to Matlab and Jaws<br>
> <br>
> Conclusion<br>
> This has been an attempt to fill in the gap left due to updates of the official Mathworks documentation not maintaining pace with the advent of Windows 7, higher versions of the Java SE, improvements in Jaws as well as the many versions of Matlab that have been released since the last official testing for accessibility has been carried out. It has attempted to provide a stepbystep walk through for allowing Matlab 32 and 64 bit versions to be set up and used by Jaws. It also presents the user to use Matlab without the use of the “diary” or “nojava” flags, thereby allowing equal access to all possible functionality within an academic or industrial testing and development scenarios.<br>
> <br>
> This solution remains the best possible work around for Matlab with respect to accessibility until Mathworks sufficiently updates its Java to 1.7.0_06 or higher. Note that although all possible effort has been taken here to maintain accuracy, the author shall in no way be deemed liable or responsible for any loss or damage, including financialor physical loss from the use of advise presented here in.<br>
> <br>
> Acknowledgements<br>
> Special thanks are due to the Mathworks Technical Support Team for assistance in implementation of this solution and without their effort, this work may have not been possible. <br>
> <br>
> References<br>
> 1. Freedom Scientific Home Page: <a href="http://www.freedomscientific.com">http://www.freedomscientific.com</a><br>
> 2. Java Archives Download Page: <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html">http://www.oracle.com/technetwork/java/javasebusiness/downloads/javaarchivedownloadsjavaclient419417.html</a><br>
> 3. Matlab Bug Report: <a href="http://www.mathworks.co.uk/support/bugreports/739518">http://www.mathworks.co.uk/support/bugreports/739518</a>