Skip to content

Enable the Java Access Bridge for the user at startup.#10525

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
jcsteh:enableJab
Nov 21, 2019
Merged

Enable the Java Access Bridge for the user at startup.#10525
michaelDCurran merged 1 commit into
nvaccess:masterfrom
jcsteh:enableJab

Conversation

@jcsteh

@jcsteh jcsteh commented Nov 20, 2019

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #7952.

Summary of the issue:

The Java Access Bridge has to be enabled within Java VMs and it isn't enabled by default. Installed JREs allow users to do this from Ease of Access. However, given that some apps now bundle their own Java VM and given that many JREs don't provide an installer (official OpenJDK is just a zip file, for example), doing this from Ease of Access isn't possible for many users. It's also an extra hoop a user really shouldn't have to jump through.

Description of how this pull request fixes the issue:

If this is an installed copy of NVDA and the JAB isn't already enabled for the user, we just do this quietly when initialising JABHandler. We do this the same way jabswitch does; i.e. writing a specific file into the user's home dir with specific content.

Testing performed:

  1. Disabled the JAB. Verified that it is enabled at startup for an installed copy.
  2. Disabled the JAB. Verified that it is not enabled at startup for a portable copy.

Known issues with pull request:

None.

Change log entry:

Changes:
- If the Java Access Bridge is not enabled for the user, NVDA automatically enables it at startup. (#7952)

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit 0ec6e0c72b

@michaelDCurran michaelDCurran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is apparently also a screen_reader_present property, according to https://docs.oracle.com/javase/7/docs/technotes/guides/access/properties.html
Might be worth adding and testing that one as well? Though I guess jabSwitch never added that one?

@LeonarddeR

Copy link
Copy Markdown
Collaborator

How about disabling the bridge from Ease of Access and then start NVDA to enable the bridge? Will EOA reflect this? I assume not, which might be slightly confusing.

@jcsteh

jcsteh commented Nov 21, 2019 via email

Copy link
Copy Markdown
Contributor Author

Comment thread source/JABHandler.py Outdated
Installed JREs allow users to do this from Ease of Access.
However, given that some apps now bundle their own Java VM and given that many JREs don't provide an installer (official OpenJDK is just a zip file, for example), doing this from Ease of Access isn't possible for many users.
It's also an extra hoop a user really shouldn't have to jump through.
Therefore, if this is an installed copy of NVDA and the JAB isn't already enabled for the user, we just do this quietly when initialising JABHandler.
@jcsteh

jcsteh commented Nov 21, 2019

Copy link
Copy Markdown
Contributor Author

jabswitch doesn't seem to set screen_reader_present. We could experiment with that, but I'd suggest we go with what jabswitch does for now and experiment separately.

@lukaszgo1

Copy link
Copy Markdown
Contributor

Would it be possible to add additional option to the tools menu which would allow users of portable copies to enable JAB? I understand why you do not want do to that for portable copies automatically, however portable copies are often used in environments in which it cannot be done from EOA, so having an option to do that from NVDA would be useful.

@michaelDCurran

Copy link
Copy Markdown
Member

I agree that adding the screenReader variable, and perhaps something in the Tools menu for portables, can be done separately if needed. this solves the main use case.

@michaelDCurran michaelDCurran merged commit 5e50ce1 into nvaccess:master Nov 21, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Nov 21, 2019
michaelDCurran added a commit that referenced this pull request Nov 21, 2019
@jcsteh jcsteh deleted the enableJab branch November 22, 2019 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a checkbox in NVDA prefferences to activate java access bridge for 32 and 64bit

6 participants