keyman icon indicating copy to clipboard operation
keyman copied to clipboard

bug(mac): Java does not appear to be 100% compatible with InputMethodKit

Open mcdurdin opened this issue 5 years ago • 38 comments

This is a container issue for compatibility issues with Java on macOS.

The following may be related: https://youtrack.jetbrains.com/issue/JBR-1758

Related issues:

  • #174 [Mac] Keyman Mac does not work with Oxygen XML editor
  • #458 [Mac] JDK compatibility problem (affects OmegaT)
  • #3243 Keyman not compatible with ELAN

mcdurdin avatar Nov 23 '20 23:11 mcdurdin

See http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8257650 for our submitted bug.

mcdurdin avatar Dec 20 '20 21:12 mcdurdin

I've gone ahead and closed #174, #458 and #3243, to reduce duplication as they all pertain to the same basic problem.

Note that there may be additional information in those issues that we want to refer to later.

mcdurdin avatar Oct 07 '21 06:10 mcdurdin

Have there been any developments with this issue? I just posted on the ELAN forum before seeing this.

https://archive.mpi.nl/forums/t/trouble-with-input-from-syllabic-orthography-keyboard/3468

Matt-SIL avatar Mar 28 '22 06:03 Matt-SIL

We have not had any progress with this; it is a limitation in Java and we submitted an issue 4 years ago for it (https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8195675). Feel free to submit another bug to Oracle!

mcdurdin avatar Mar 28 '22 06:03 mcdurdin

Ok, I'm not sure I know enough to submit a bug with all the technical info they need but I would live to tell them this potentially affects a large number of minority languages.

Matt-SIL avatar Mar 28 '22 14:03 Matt-SIL

It's difficult -- I hope that bug reports from various people would help them to understand the scope. In theory we could submit a patch, but the amount of legwork that is required to do that seems daunting! (This seems to be a problem with quite a few large open source projects -- they develop policies and procedures which work for them but effectively lock out external contributors who already have to navigate huge technical complexity in order to submit patches, and the additional policy complexity just makes it too hard.)

mcdurdin avatar Mar 28 '22 19:03 mcdurdin

Hi @mcdurdin, I have a similar issue running the IPA(SIL) Keyboard on Mac. They keyboard works well everywhere, except for ELAN. Any recommendation where I should look for a solution?

JuarezRC avatar Jan 24 '23 17:01 JuarezRC

@JuarezRC, yes, this is a long-standing issue. We are waiting for Java developers to fix things on their end -- Keyman is behaving correctly; Java (which ELAN is built on) is not. The two bug reports above have had no response from Oracle or any Java Development Kit developers; we may need to try and raise them in forums or Java dev mailing lists. We have not had the in-team capacity to chase these up until now.

Can I encourage you to also open a bug report or ask on the Java Discussion group (looks like awkward timing though as they are migrating their Discussion databases in the next couple of days -- may want to wait a week).

  • Java Discussion Group: https://community.oracle.com/tech/developers/categories/jug-discuss
  • Java Bug Report: https://bugs.java.com/bugdatabase/
  • Java Developer Mailing List: https://mail.openjdk.org/mailman/listinfo/jdk-dev

Other possible workarounds, even if not palatable -- mentioned for completeness:

  • Use ELAN on Windows, where AFAIK things work correctly.
  • Copy and paste text into ELAN

We will also have another go at contributing a patch to JDK when we find the capacity (@sgschantz this may be something you could look into?)

mcdurdin avatar Jan 25 '23 00:01 mcdurdin

Thanks! I will follow up on this.

JuarezRC avatar Jan 26 '23 21:01 JuarezRC

OpenJDK:

  • https://bugs.openjdk.org/browse/JDK-8195675
  • https://bugs.openjdk.org/browse/JDK-8257650 (dup)

mcdurdin avatar Sep 14 '23 10:09 mcdurdin

@srl295 please review

mcdurdin avatar Sep 14 '23 10:09 mcdurdin

See https://github.com/keymanapp/keyman/pull/3944 for sample patch

mcdurdin avatar Sep 14 '23 10:09 mcdurdin

PR: https://github.com/openjdk/jdk/pull/17921

srl295 avatar Mar 01 '24 06:03 srl295

Some positive progress on this with openjdk, follow links above

mcdurdin avatar Mar 15 '24 23:03 mcdurdin

See also https://community.software.sil.org/t/keyman-and-xlingpaper/8580/1 (presumably XMLMind which XLingPaper is based on)

mcdurdin avatar Mar 21 '24 20:03 mcdurdin

See also https://community.software.sil.org/t/keyman-and-xlingpaper/8580/1 (presumably XMLMind which XLingPaper is based on)

Yes, the XMLmind XL Editor (aka XXE) is written in Java and XLingPaper is a set of configuration files for it. The challenge we'll face is that most XLingPaper users are using an older version of XXE which still had a personal use license. The version they're using will not have the fix to the openjdk. Sigh.

AndyBlack avatar Apr 16 '24 21:04 AndyBlack

@srl295 do you have any updates on the OpenJDK fix?

mcdurdin avatar Apr 18 '24 05:04 mcdurdin

The OpenJDK PR is approved and should merge tomorrow into Java 23

srl295 avatar May 27 '24 14:05 srl295

Process: we'll keep this open as we track back-ports into earlier versions of Java.

mcdurdin avatar May 27 '24 14:05 mcdurdin

If I understand this correctly, then you will try to make this needed change in earlier versions of Java. Thank you! For XLingPaper, it looks like the version of the XMLmind XML Editor we're using is based on Java version 1.8.0_181 (or higher). For the other Java-based applications I'm responsible for, we've been using 1.8.0_162 (which is the last "free" one, I understand). These applications are https://software.sil.org/lingtree/, https://software.sil.org/lingtree/diagsap/, https://software.sil.org/paws/, and https://software.sil.org/asheninka/.

AndyBlack avatar May 27 '24 16:05 AndyBlack

If I understand this correctly, then you will try to make this needed change in earlier versions of Java. Thank you!

For XLingPaper, it looks like the version of the XMLmind XML Editor we're using is based on Java version 1.8.0_181 (or higher).

For the other Java-based applications I'm responsible for, we've been using 1.8.0_162 (which is the last "free" one, I understand). These applications are https://software.sil.org/lingtree/, https://software.sil.org/lingtree/diagsap/, https://software.sil.org/paws/, and https://software.sil.org/asheninka/.

Ouch 1.8? I think 11 is the earliest in the openjdk tree. 1.8 may be challenging. Update: oracle says they are not making public updates to 8.

As to "free" are you familiar with Temurin? https://adoptium.net/temurin/ fully certified binaries for v21.. free.

srl295 avatar May 27 '24 16:05 srl295

I cannot control the version for the XMLmind XML Editor. For the apps I'm responsible for, I've been keeping with 8 mainly because it came with easy-to-use installer mechanisms for Windows, Mac, and Linux. I have built one other Java app using 17 but for Windows only and found the learning curve for installers a bit high. I'm not against climbing the learning curve, it just appears to be very time consuming since there is so much I do not control... Having some examples to follow would be helpful. For 17, I've used Azul Zulu which is also free. They even fixed a bug I found... See https://www.azul.com/downloads/?package=jdk#zulu

AndyBlack avatar May 27 '24 17:05 AndyBlack

I cannot control the version for the XMLmind XML Editor. For the apps I'm responsible for, I've been keeping with 8 mainly because it came with easy-to-use installer mechanisms for Windows, Mac, and Linux. I have built one other Java app using 17 but for Windows only and found the learning curve for installers a bit high. I'm not against climbing the learning curve, it just appears to be very time consuming since there is so much I do not control... Having some examples to follow would be helpful.

Temurin has installers for Windows. Here's an article about using jlink with temurin. https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/

jpackage can build installers https://docs.oracle.com/en/java/javase/17/jpackage/packaging-overview.html#GUID-E0966C49-ABBB-46A2-8DF7-1D3F96640F05

For 17, I've used Azul Zulu which is also free. They even fixed a bug I found... See https://www.azul.com/downloads/?package=jdk#zulu

Azul says it is builds of openjdk. So if it were backported to OpenJDK 17, it should show up in Azul.

srl295 avatar May 27 '24 20:05 srl295

Thanks

AndyBlack avatar May 27 '24 20:05 AndyBlack