<AWT Dev> java-atk-wrapper accessibility and openjdk9

Fridrich Strba fridrich.strba at suse.com
Tue Nov 14 07:26:06 UTC 2017


Hello, good people,

I am answering this for those who might fall on the thread and feel like
it went hanging.

On 25/10/17 22:04, mandy chung wrote:
> The maintainer of java-atk-wrapper was informed of the new
> javax.accessibility.AccessibilityProvider service interface during JDK 9
> development.   java-atk-wrapper will need to implement a provider of
> AccessibilityProvider to run on JDK 9 [1].
> Adding to Phil's comment, java-atk-wrapper can become a modular JAR.
> Alternatively it can deploy as a service provider on classpath by
> including a service configuration file under META-INF/services/ [2]
> I suggest you to contact the library maintainer to get a version of
> java-atk-wrapper that supports JDK 9.

I contacted the maintainer and am still waiting for the answer :(
Nevertheless, I went ahead and ported java-atk-wrapper to JDK 9. There
are two bugs in gnome bugzilla having my patches:

https://bugzilla.gnome.org/show_bug.cgi?id=789956 is having all the
patches that don't bump the required JDK to 9, but solve several issues
I met when I was porting it.

https://bugzilla.gnome.org/show_bug.cgi?id=789959 is having two patches,
one implementing the new provider and the other making j-a-w a module
called atk.wrapper.

I am also attaching minimal versions of the patches that allow just
build the java-atk-wrapper-0.33.2 tarball using the built jdk9 in our
RPM files. They don't allow build out of the tree and install has to be
done by "cp", but they work. This is the snippet that builds and
integrates it:

export JAVA_HOME=$(pwd)/%{buildoutputdir}/%{imagesdir}/jdk
....
pushd java-atk-wrapper-%{java_atk_wrapper_version}
autoreconf --force --install
rm wrapper/org/GNOME/Accessibility/AtkWrapper.java
%configure \
	--without-jdk-auto-detect \
	JDK_SRC=$JAVA_HOME
rm wrapper/org/GNOME/Accessibility/AtkWrapper.java
make %{?_smp_mflags}
cp wrapper/java-atk-wrapper.jar $JAVA_HOME/../jmods/
cp jni/src/.libs/libatk-wrapper.so $JAVA_HOME/lib/
popd
# Merge the java-atk-wrapper into the JDK
source $JAVA_HOME/release; export MODULES
$JAVA_HOME/bin/jlink --module-path $JAVA_HOME/../jmods --add-modules
"atk.wrapper,${MODULES//\ /,}" --output $JAVA_HOME/../newjdk
cp -rf $JAVA_HOME/../newjdk/* $JAVA_HOME/
rm -rf $JAVA_HOME/../newjdk

Needless to say that the patch patching the class loader is in the bin.

Thanks for your ideas

Fridrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jaw-jdk9.patch
Type: text/x-patch
Size: 4913 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20171114/78b626d6/jaw-jdk9-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jaw-misc.patch
Type: text/x-patch
Size: 1616 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20171114/78b626d6/jaw-misc-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20171114/78b626d6/signature-0001.asc>


More information about the awt-dev mailing list