Skip to content

Conversation

@sonthien22501
Copy link

Closes _____

Problem

The original jabrefHost.py script was hardcoded to look for JabRef in the standard macOS installation folder (/Applications/JabRef.app). Since I am developing and running JabRef from the source code (using Gradle), I don't have a packaged app installed there. This caused the Native Messaging host to fail because it couldn't find the executable.

Solution

I modified jabrefHost.py to add a development path check. The script now looks for the executable in two places:
1. First: It checks my local build folder (jabgui/build/install/jabgui/bin/JabRef).
2. Second: It falls back to the standard system path

Result

This allows us to test the browser extension against the latest code changes I make in the IDE immediately, without needing to package and install the full application every time I change a line of code. It streamlines the development loop significantly.

Steps to test

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [.] I manually tested my changes in running JabRef (always required)
  • [.] I added JUnit tests for changes (if applicable)
  • [.] I added screenshots in the PR description (if change is visible to the user)
  • [.] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [.] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@sonthien22501
Copy link
Author

For the connection between Jabref and Plugin extension, i have seen that Jabref its own has that feature.
We implement a hybrid communication model. We use Native Messaging to command the OS (like checking for the app or launching imports) and HTTP/Localhost to quickly read library data. This ensures we have both the power to interact with the desktop app and the speed required for checking DOIs on every page load (will be implemented in the next phase).

@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Jan 8, 2026
@sonthien22501
Copy link
Author

Closing this PR as it was opened against the wrong repository by mistake. I intended to open this on my fork.

@koppor
Copy link
Member

koppor commented Jan 8, 2026

We implement a hybrid communication model. We use Native Messaging to command the OS (like checking for the app or launching imports)

Please try to use http only - this should reduce complexity. - Read on from https://github.com/JabRef/jabref/blob/main/jabsrv/src/main/java/org/jabref/http/server/command/SelectEntriesCommand.java to learn about the command resource

@palukku I think, this is our intended way, isn't it?

@sonthien22501 sonthien22501 reopened this Jan 8, 2026
@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable). Please adhere to our pull request template.

@Siedlerchr
Copy link
Member

This also refs #14823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: changes-required Pull requests that are not yet complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants