-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUI focus stolen due to epubcheck launching window-less “Checker” empty GUI app #665
Comments
How are you calling epubcheck? When I run it from the command line I don't get a GUI coming up for every EPUB. |
JRE 1.8 installed by installing the browser plugin from http://java.com. epubcheck installed via Homebrew. |
If you don't already have it or know where to find it, download the jar file and put it somewhere on your computer you can access it. I keep mine in the applications folder for the sake of ease. At that point you can run a simple for loop through terminal or create an executable script or Automator app that can run it for you. Just throw it into a for loop, e.g.
I like to pipe my results into tee just to make them prettier and easier to read. |
It seems to be an issue specific to the Homebrew build. @tofi86, any idea? |
I can confirm the issue with the homebrew epubcheck. Homebrew pull the release package directly from this projects GitHub releases page and unzips it to The
|
Ahhh, darn it! So at least it has nothing to do with Homebrew... |
Also happens with 4.0.1 and Java 7 (tested jdk1.7.0_79) |
If ran with Apple’s Java 1.6, the name of the app is com.adobe.epubcheck.tool.Checker instead. Again, com.Adobe?? |
@elmimmo that's the package identifier for EpubCheck: That's because initial development of EpubCheck was largely done by Adobe and they created the project in their namespace... |
Observations:
Can someone confirm that? I haven't found a clue yet why this happens and don't have time to do a debug session in Eclipse this evening... |
I can confirm that this happens (a GUI app named
|
Have you tried using the " -Djava.awt.headless=true" flag? |
I just tried that, and it works. Thanks! |
Alright, this was quite an intense debugging session but I found the cause for the window-less GUI app on Mac OS X: com.adobe.epubcheck.bitmap.BitmapChecker line 122:
It's the
Unfortunately it's always the same solution: setting java system property Which doesn't help in our case because it can't be set during runtime but must be passed to the JVM on startup... @rdeltour I remember other / earlier problems with the ImageIO library and we partly switched to/from the TwelveMonkeys library. Any chance that this caused the trouble? Contributions and help very welcome! |
Of course, when debugging this you need to uncomment lines 122 and following and add an additional return statement for I tested with file |
needs to be set as early as possible in a static way
Has anyone in this thread tried my patch from PR #732 yet? Does it work? Any feedback? |
needs to be set as early as possible in a static way
Running epubcheck from the command-line still launches a window-less GUI app named Checker that claims the GUI’s focus. The app stays open until epubcheck finishes its thing, at which point it kills itself (returning the focus it stole if the user did not claim it back).
It thus becomes impossible to run epubcheck in the background while the user works on something else, specially when running batch-checks of lots of EPUBs (which involves calling epubcheck once per ebook, therefore causing that dreaded GUI app to launch repeatedly), since the user is then constantly taken away from whatever app he or she is using.
Observed on OS X Yosemite 10.10.5 (14F27) and JRE 1.8.
The text was updated successfully, but these errors were encountered: