5

In Java 1.7, the Java Access Bridge is bundled from start. It says that all you need to do is to run jabswitch.exe -enable to enable the JAB for this particular JRE.

This works fine when you get your JRE from the installer. However, when deploying a Java application for Windows only, you may want to bundle a JRE for easier installation. When the JRE is bundled, it seems impossible to activate the Java Access Bridge

Is there a way to enable the Java Access Bridge in a bundled JRE?

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
Wiggan
  • 61
  • 2
  • 4
  • Check this out: http://docs.oracle.com/javase/7/docs/technotes/guides/access/enable_and_test.html – Aishwarya Shiva Dec 18 '13 at 10:13
  • Also don't forget to open command prompt as administrator before executing `jabswitch.exe -enable`. – Aishwarya Shiva Dec 18 '13 at 10:22
  • Thank you for the tips. That is the document I've read, and I ran the command as administrator. It still doesn't work. – Wiggan Dec 18 '13 at 10:47
  • what error you are actually getting when you run this command? – Aishwarya Shiva Dec 18 '13 at 10:53
  • There are no errors as far as I know. JAWS just doesn't work the same way as when jre is actually installed and access bridge enabled in the ease of access control panel section. My conclusion is that it hasn't activated it. – Wiggan Dec 18 '13 at 10:58
  • I've also found this link: http://www.freedomscientific.com/fs_support/BulletinView.asp?QC=1435 Check this out if it works. – Aishwarya Shiva Dec 18 '13 at 11:21
  • Also note that if you have a 64-bit system, it might be the cause of your problem. – Aishwarya Shiva Dec 18 '13 at 11:28
  • That link is from 2011, when java 7 wasn't released and access bridge wasn't bundled in jre. How would 64-bit system be the problem here? A test I've run was to install jre, enable it and see that it worked, copy the folder to another location and uninstall it, enable again and access bridge doesn't work. – Wiggan Dec 18 '13 at 11:57
  • 1
    I'm experiencing the same problem with java 1.8. Have you managed to enable java access bridge in a bundled jre? – archie_by May 25 '15 at 14:23
  • 1
    copying WindowsAccessBridge-64.dll to the System32 folder as the guide suggests for private JREs gives nothing. Everything works great while I have a public JRE installed with jabswitch -enable (d) together with my private JRE, but when I disable or remove it JAWS stops all reading – archie_by May 25 '15 at 14:36

3 Answers3

0

I think the command line switch takes a / not a -

e.g. jabswitch.exe /enable

here is the command line help

jabswitch.exe /help

jabswitch [/enable | /disable | /version | /?]

Description:
  jabswitch enables or disables the Java Access Bridge.

Parameters:
  /enable   Enable the Java Accessibility Bridge.
  /disable  Disable the Java Accessibility Bridge.
  /version  Display the version.
  /?        Display this usage information.

Note:
  The Java Access Bridge can also be enabled with the
  Windows Ease of Access control panel (which can be
  activated by pressing Windows + U).  The Ease of Access
  control panel has a Java Access Bridge checkbox.  Please
  be aware that unchecking the checkbox has no effect and
  in order to disable the Java Access Bridge you must run
  jabswitch.exe from the command line.

Also with respect to JAWS, try to get Java7 update 60, which comes with JAB 2.0.4, as this version fixes a bug with JAWS.

Giles Bathgate
  • 724
  • 6
  • 8
0

You need to do three steps (describing for configuration: Windows 7 64 bits, private JRE 8 64 bits, and JAWS 14):

  1. Copy \jre\bin\WindowsAccessBridge-64.dll to C:\Windows\System32 as documented at Oracle site: http://docs.oracle.com/javase/7/docs/technotes/guides/access/enable_and_test.html
  2. (Undocumented) Import the following registry file:

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Accessibility]
    "Configuration"=",oracle_javaaccessbridge"
    
  3. (Undocumented) Add JRE binaries location to user's PATH environment variable (e.g. C:\mydir\jre\bin)

Make sure you have uncommented lines in accessibility.properties:

assistive_technologies=com.sun.java.accessibility.AccessBridge
screen_magnifier_present=true

Also, start JAWS before your Java application.

Barat Sahdzijeu
  • 1,683
  • 1
  • 18
  • 29
0

Doing jabswitch.exe /enable only changes some global parameter which is not identical for different versions of Java. In my case, it enabled Java 8 but not Java 7.

As it turns out, at least in Windows 10/11, it suffices to simply uncomment two lines in accessibility.properties in the subdir lib of each bundled JRE:

assistive_technologies=com.sun.java.accessibility.AccessBridge
screen_magnifier_present=true

Note: According to Microsoft it may additionally be necessary to disable the global switch: Enter in the Start menu "Optimize visual display" and then on the very bottom check off Java Access Bridge. In my case it worked irrespective of the global setting, so I assume the accessibility.properties takes precedence.

Robert
  • 1,357
  • 15
  • 26