Java Access Bridge

Introduction

Java Access Bridge connects the built-in accessibility support in Java Swing applications to the GNOME Accessibility framework, specifically the Assistive Technology Service Provider Interface (AT-SPI).

Downloading the Java Access Bridge

Select the latest JABG version from a directory under here:

Follow these steps to complete the download process. These steps were written assuming you downloaded java-access-bridge-1.18.0, but should work for later versions as well. Eg. This process work on java-access-bridge-1.26.2.

  1. Firefox web browser will display a dialog asking you what Firefox should do with the downloaded file. Choose the 'Open with Archive Manager (default)' radio button and hit the 'OK' button.
  2. Firefox will download the file and display a second dialog giving you a choice of what to do with the download file. Select 'java-access-bridge-1.18.0.tar' (or whichever version you chose to download) from the file list and hit the 'Extract' button.
  3. Firefox with then display a third dialog asking you where to extract the downloaded file. Select your home directory and hit the 'Extract' button. Firefox will create a subdirectory called 'java-access-bridge-1.18.0' under your home directory and extract the JABG files into the subdirectory.

Installing the Java SE JDK

You need to have the Java SE Development Kit (JDK) installed in order to build the JABG. Run the following command to install the latest JDK, which is Java 6.

sudo apt-get install sun-java6-jdk

The Java 6 JDK will be installed in /usr/lib/jvm/java-6-sun.

Building the Java Access Bridge

Change directory to the subdirectory containing the JABG source files.

cd ~/java-access-bridge-1.24.1

Run the following command to configure the JABG build for your system. The '--with-java-home' option specifies that the Java 6 JDK will be used to build the JABG.

./configure --with-java-home=/usr/lib/jvm/java-6-sun --prefix=`pkg-config --variable=prefix ORBit-2.0`

Next, run the 'make' command to build the JABG. The build will take a few minutes to run. Ignore any warning messages.

make && sudo make install

The JABG build is now complete.

Installation

Run the following commands to install the JABG on the Java 6 JDK.

export JAVA_HOME=/usr/lib/jvm/java-6-sun  (this is on linux, if on OpenSolairs,
it should be export JAVA_HOME=/usr/java/)
sudo ln -f -s /usr/share/jar/accessibility.properties \
    $JAVA_HOME/jre/lib/accessibility.properties
cp /usr/share/jar/gnome-java-bridge.jar \
    $JAVA_HOME/jre/lib/ext
mv /usr/lib/libjava-access-bridge-jni.so.0.0.0 \
    $JAVA_HOME/jre/lib/ext/libjava-access-bridge-jni.so

There are four files that should be put suitable directories:

  1. accessibility.properties: ( $JAVA_HOME/jre/lib/ ) This file tells JVM the entry class of Java Access Bridge.
  2. gnome-java-bridge.jar: ( $JAVA_HOME/jre/lib/ext/ ) This is the bridge jar package.
  3. libjava-access-bridge-jni.so ( $JAVA_HOME/jre/lib/ext/ ) This is a JNI library that sets NO_AT_BRIDGE.
  4. orbitrc: ( /etc ) This is the orbit configuration file. You want the following two lines in the file to enable Java accessibility. Note that you can also put these lines in ~/.orbitrc to make a per-user setting.

ORBIIOPIPv4=1
ORBLocalOnly=1

Note that the Java Access Bridge is not installed on a per-machine basis, but on a per-JDK basis. If you have other Java versions installed on your system, run the commands above for each version, but specify the path to the version instead of '/usr/lib/jvm/java-6-sun' after 'export JAVA_HOME='.

Verifying the Java Access Bridge Installation

Run the following commands to verify that the JABG is built and installed correctly on the Java 6 JDK.

export JAVA_HOME=/usr/lib/jvm/java-6-sun
ls $JAVA_HOME/jre/lib/accessibility.properties
ls $JAVA_HOME/jre/lib/ext/gnome-java-bridge.jar
ls $JAVA_HOME/jre/lib/ext/libjava-access-bridge-jni.so

The JABG is installed correctly if the 'ls' command lists the 'accessibility.properties' and 'gnome-java-bridge' files in /usr/lib/jvm/java-6-sun. You can verify the JABG is installed correctly on other Java versions by specifying the path to the version instead of '/usr/lib/jvm/java-6-sun' after 'export JAVA_HOME='.

To verify whether Java Access Bridge is works or not, first you should enable accessibility, then you can start a demo Java application, for example, java -jar $JDK_HOME/demo/jfc/Notepad/Notepad.jar. If it shows "Just registered Application" and no any exceptions are thrown out, the installation is successful.

OpenSolaris Notes

  1. Create a ~/.orbitrc as above.
  2. Run these commands:

pfexec ln -f -s /usr/share/jar/accessibility.properties \
    /usr/java/jre/lib/accessibility.properties
pfexec ln -f -s /usr/share/jar/gnome-java-bridge.jar \
    /usr/java/jre/lib/ext

NOTE - making symbolic links might cause Java Web Start applications to crash. You might need to actually copy the files instead.

Troubleshooting

Message: configure: error: C compiler cannot create executables

Solution: Try to install g++

References about this troubleshooting: http://www.vivaolinux.com.br/dica/C-compiler-Cannot-create-executable

Message: No package 'gtk+-2.0' found

Solution: try to install libgtk2.0-dev

References about this troubleshooting: http://ubuntuforums.org/showthread.php?p=46719

Message: No package 'bonobo-activation-2.0' found

Solution: try to install libbonobo2-dev

Message: No package 'libspi-1.0' found

Solution: try to install libatspi-dev

References about this troubleshootings: http://ubuntuforums.org/showthread.php?t=141948

Message: My Orca crashes on initialization

Solution: try ro run the Orca on terminal $ orca -t

Reference about this troubleshooting: http://ubuntuforums.org/archive/index.php/t-774939.html


JAB

GNOME

Comment

1.20

2.20

/usr/bin/xprop used to find IOR for at-spi-registryd. Accessibility activation was changed in GNOME to improve multi-user accessibility.

1.22

2.22

/usr/bin/xprop used to find IOR for at-spi-registryd. Accessibility activation was changed in GNOME to improve multi-user accessibility.

Attic/Java Access Bridge (last edited 2013-11-22 16:27:22 by WilliamJonMcCann)