Bundle the Java Access Bridge with NVDA.#10515
Conversation
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit b5fd9013ef |
NVDA is a 32 bit application and requires the 32 bit Java Access Bridge client dll. This will happily talk to 64 bit Java applications. However, since Java 10, official 32 bit builds are no longer provided. So that users don't have to find and install a community 32 bit build of Java themselves, bundle the JAB with NVDA. 1. Include the dll via a Git submodule. 2. Have SCons copy the dll into source/lib. 3. Modify JABHandler to load it from the versioned lib directory if appropriate. This meant reorganising initialisation somewhat, as we need NVDAHelper to get the versioned lib path, but trying to use it at module level breaks due to circular import. 4. Remove JABHandler's support for the legacy bridge, since it can no longer be used now that the proper 32 bit bridge is always present.
| if legacyAccessBridge: | ||
| del cdll.windowsAccessBridge | ||
| else: | ||
| delattr(cdll,'windowsAccessBridge-32') |
There was a problem hiding this comment.
No. When you use cdll.LoadLibrary (which we now do so we can specify the full path), the ctypes loader cache isn't used:
__getattr__()has special behavior: It allows loading a shared library by accessing it as attribute of a library loader instance. The result is cached, so repeated attribute accesses return the same library each time.
LoadLibrary(name)
Load a shared library into the process and return it. This method always returns a new instance of the library.
https://docs.python.org/3/library/ctypes.html#ctypes.LibraryLoader
feerrenrut
left a comment
There was a problem hiding this comment.
This looks good, my recommendation is to merge for broader testing on alpha. My biggest concern is the source of the DLL, I'd prefer that we built it to remove the risk of unknown modifications, unless it isn't practical. I'd like to get an opinion from @michaelDCurran too.
|
FWIW, it looks like Azul is a company with a business based around Java stuff (not just a random community packaging site), so I'm not so concerned about unwanted modifications. The dlls are also signed by Azul. That said, if we want to go with my build instead, I can resurrect it and use it instead.
|
|
Hello, This attachment is the file changed by jabswitch in the user profile folder. Hope this helps. Cheers, |
|
Thanks for this, so, will it work if we have jdk8 installed since the jab is from java version 13? will there be any conflicts? also, will we be able to expect more accessibility in java applications since the jab is new? |
It seems to be fine - Android Studio uses JDK 8 and my (very brief) testing of that seems to work - but as I noted in the known issues section above, I can't be certain. There's also nothing we can do about that if it does turn out to b a problem.
No. The JAB hasn't had any significant updates in years and I doubt it ever will. On the flip side, that also means the chance of it breaking with different versions is minimal.
Not sure what you mean exactly. Android Studio bundles its open OpenJDK 8. As noted above, that seems to work. If you mean using Android Studio with a different JDK, I don't know. I saw some documentation about that, but it seems to be pretty obscure to set up at best. |
|
|
No, you don't need to install a JDK to use Android Studio now, since it
bundles its own JRE and NVDA's bundled JAB seems to work with that bundled
JRE.
|
|
ok. thanks
…On 11/24/19, James Teh ***@***.***> wrote:
No, you don't need to install a JDK to use Android Studio now, since it
bundles its own JRE and NVDA's bundled JAB seems to work with that bundled
JRE.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#10515 (comment)
|
Link to issue number:
Fixes #7724.
Summary of the issue:
NVDA is a 32 bit application and requires the 32 bit Java Access Bridge client dll. This will happily talk to 64 bit Java applications. However, since Java 10, official 32 bit builds are no longer provided. This means that users have to find and install an unofficial community 32 bit build of Java themselves if they wish to access Java applications.
Description of how this pull request fixes the issue:
Bundle the JAB with NVDA:
Testing performed:
Ensured no JAB was present in c:\windows\syswow64 and started Android Studio. Android Studio was accessible via JAB.
Known issues with pull request:
Change log entry:
Changes:
- The Java Access Bridge is now included with NVDA to enable access to Java applications. (#7724)