QZTray on Windows 7

342 views
Skip to first unread message

Joshua King

unread,
Sep 3, 2015, 5:25:18 PM9/3/15
to qz-print
I've got a few client computers on Windows 7 64-bit, most of them worked fine with QZTray. I have one that nothing seems to happen when I launch QZTray, I've tried re-installing Java, re-installing QZTray, turning off anti-virus, and disabling everything in msconfig startup. No luck.

Anything else I should try?

Thanks!

Tres Finocchiaro

unread,
Sep 3, 2015, 5:39:59 PM9/3/15
to Joshua King, qz-print

Joshua,

Can you try launching in debug mode?

https://qz.io/wiki/faq#how-do-i-debug-qz-tray

I've got a few client computers on Windows 7 64-bit, most of them worked fine with QZTray. I have one that nothing seems to happen when I launch QZTray, I've tried re-installing Java, re-installing QZTray, turning off anti-virus, and disabling everything in msconfig startup. No luck.

Anything else I should try?

Thanks!

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua King

unread,
Sep 3, 2015, 5:51:54 PM9/3/15
to qz-print, king.josh...@gmail.com
That runs it as long as I keep the cmd line window open, here's the output:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

I entered: java -jar "%PROGRAMFILES%\QZ Tray\qz-tray.jar"
Sep 03, 2015 5:48:29 PM qz.utils.ShellUtilities execute
INFO: Executing: [C:\Windows\system32\reg.exe, query, HKCU\Software\Microsoft\Wi
ndows\CurrentVersion\Internet Settings\Zones\1, /v, Flags]
Sep 03, 2015 5:48:29 PM qz.auth.CRL$1 run
INFO: Loading CRL https://crl.qz.io...
Sep 03, 2015 5:48:29 PM qz.utils.ShellUtilities execute
INFO: Executing: [C:\Windows\system32\reg.exe, query, HKCU\Software\Microsoft\Wi
ndows\CurrentVersion\Run\, /v, QZ Tray]
Sep 03, 2015 5:48:29 PM qz.deploy.DeployUtilities loadSSLProperties
INFO: SSL properties file from C:\Program Files\QZ Tray\qz-tray.properties
2015-09-03 17:48:29.850:INFO::main: Logging initialized @1296ms
2015-09-03 17:48:29.913:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
2015-09-03 17:48:29.944:INFO:oejs.ServerConnector:main: Started ServerConnector@
6824be{HTTP/1.1}{0.0.0.0:8182}
2015-09-03 17:48:29.975:INFO:oejs.ServerConnector:main: Started ServerConnector@
bb4df8{SSL-HTTP/1.1}{localhost:8181}
2015-09-03 17:48:29.975:INFO:oejs.Server:main: Started @1427ms
Sep 03, 2015 5:48:29 PM qz.common.TrayManager$14 run
INFO: Tray Message: Server started on port(s) 8182, 8181
Sep 03, 2015 5:48:29 PM qz.ws.PrintWebSocketServer runServer
INFO: Server started on port(s) 8182, 8181
Sep 03, 2015 5:48:30 PM qz.auth.CRL$1 run
INFO: Successfully loaded 1 CRL entries from https://crl.qz.io

Tres Finocchiaro

unread,
Sep 3, 2015, 7:08:19 PM9/3/15
to Joshua King, qz-print
Can you type the following in a CMD window?

assoc .jar

Note the space between the word "assoc" and the word ".jar".

If this comes back as anything except "jarfile", can you open a new CMD window, but this time, Right Click, Run As Administrator.

Then type:

assoc .jar=jarfile

And then try the desktop shortcut again.

If this works properly, we can add a dialog box to our next version to do this automatically at install.

-Tres 

Joshua King

unread,
Sep 4, 2015, 10:56:18 AM9/4/15
to qz-print, king.josh...@gmail.com
It was already set to jarfile.

Tres Finocchiaro

unread,
Sep 4, 2015, 11:19:57 AM9/4/15
to Joshua King, qz-print

If the manual launch method works fine and the jar file association is correct, it is likely that you have a corrupt registry key somewhere or a corrupt Java installation.

Can you try double-clicking qz-tray.jar and post your results?

If this works, can you send us the shortcut that is broken so that we can examine it?

Joshua King

unread,
Sep 4, 2015, 11:47:09 AM9/4/15
to qz-print, king.josh...@gmail.com
Double-clicking doesn't work. Re-installed Java, no dice. 

I ended up just creating a batch file with the following: start /min java -jar "%PROGRAMFILES%\QZ Tray\qz-tray.jar"

Might be worth doing for the installer so you're less reliant on file associations and the registry to ensure the app runs?

Joshua King

unread,
Sep 4, 2015, 11:50:26 AM9/4/15
to qz-print, king.josh...@gmail.com
Negative to it though, there's now an instance of Java running in the taskbar like a program. So this will work as a band-aid, but is not a good permanent solution as it's more likely my end-user's will close this than a system tray icon.

Tres Finocchiaro

unread,
Sep 6, 2015, 2:07:16 AM9/6/15
to Joshua King, qz-print
You can use javaw.exe instead (directly, not in a batch file) of java.exe to hide the console window, but the solution you've provided won't make it into our installer without some improvements first.

Oracle does some things which are non-ideal such as placing a copy of java.exe in C:\Windows\System32, which is sloppy and problematic since the proper version is installed in Program Files\Java.

Currently, we use a Windows LNK shortcut to the JAR or for the Desktop shortcut we use a URL formatted shortcut to launch the JAR with the associated program (you've confirmed these values are correct, so I think something else is going on).  Our approach works 99.9% of the time so as long as the JAR file associate is correct (sorry that you are in the 0.1% here).

The ideal approach would be to detect the current version of Java and launch it directly by path.  On Apple we've taken a similar approach, but out of necessity since Apple blocks the command line version unless you have the SDK installed.

We may move to a similar method for Windows as well, which we have mostly written, but would have to launch a script each time.  Accommodating all edge cases takes a lot of time (such as this Firefox detection script), but we need to know why the process is failing in order to improve upon it.


Reply all
Reply to author
Forward
0 new messages