Re: [Openjnlp-devel] Handling System.err (and System.out)
Brought to you by:
kherr
From: Christopher H. <he...@ez...> - 2002-06-14 21:36:16
|
On Friday 14 June 2002 11:43 am, you wrote: > On Thursday, June 6, 2002, at 12:46 AM, Christopher Heiny wrote: > > I've noticed we tend to lose a lot of information written to System.err > > (and > > in some cases to System.out). System.err is especially important, since > > Are messages really being lost? My testing shows all messages. On Mac OS > X they go to the system console until the GUI comes up, and then into > the Console window. If I run from the command line the messages show up > in my terminal window. The CLI interface works the same for Linux. The GUI is another matter - the messages are lost until you open the OpenJNLP Console (they are not appearing on my system console under KDE - potentially this is my configuration, which is something to look into). > > right now loading and/or applications can fail silently, leaving the > > user (or > > even the developer :-) ) to wonder what the heck happened, and probably > > abandoning OpenJNLP abandoning for other solutions. > > This is a really tough problem to address, I've run into this before on > other projects that launch Java apps. There is no way to tell if a Java > app "fails" other than the obvious like not finding the main class. Once > it starts running the class loader may fail to find a class but that > doesn't necessarily mean the app failed. True. We're trying to address a similar issue with our .jnlp deployed applications here. We don't have a complete solution, but it is important to minimize this problem's impact. (see following) [snip suggestion to redirect System.err to pop-up in GUI mode] > > I'd have to disagree with this. This would get annoying very quickly. > The whole point of the console is to provide the capability to see > diagnostic messages but in a non-obtrusive manner. It is impossible to > tell which messages are "alert" messages and which are normal output by > the app that's being run. Because the messages go into the console even > when it's not visible, a user can always see what's happening or has > happened. Well, things written to System.err are by definition alerts and not normal output, right? That's what System.err is for. System.out is for normal output, and I'm suggesting no change in its handling. My personal feeling is that any application that writes normal messages to System.err needs to have its head examined. :-) If you're writing to System.err, it's because you want to call attention to something that has probably not gone as the user expected it to. Under Linux, most users are unlikely to have a system console open. This is even more likely under Solaris. In the case of an app failing to launch (for example) under the current handling of System.err, this results a silent and mysterious failure. This is a >big< user dissatisfier, and because OpenJNLP is the primary interface, it is receiving the blame (around here we're using OpenJNLP to deploy some of our internal tools, and of course people have discovered that there are other cool .jnlps out there on the internet, and when those don't work, it's not the application's fault...). > Have you tried Java Web Start to see how it behaves? I've noticed that > you can launch an app with its own console open which has its advantages > but doesn't give the user a feeling of centralized management. I'll try to characterize JWS's behavior. Chris |