Debugging a Remotely Deployed Java Webstart App, Locally
Recently, I’ve been fiddling around with deploying a Java WebStart application.
For those of you who don’t know what that is, it’s a Java desktop application that is delivered on the spot over the web, typically by clicking on a link in a browser. The application is downloaded on the spot and run locally on your machine using your Java Virtual Machine (JVM).
It’s actually kind of cool, however, for better or for worse, Java WebStart apps (and their closely related cousins – applets) have been on the down-trend for a few years now due to security issues and otherwise. The latest versions of Google Chrome don’t even allow 1-click download, install and launch any more.
However, what if like me, you find yourself temporarily in the world of WebStart app development, and even trickier, need to debug one that seems to be failing only after deployment?
For my needs the answer was fairly simple if not a bit arcane. In short:
Open up your Java Control Panel (on Ubuntu it can be found inside system settings). Go to the “Advanced” tab and under the “Debugging” section make sure to enable logging of traces and exceptions. Next time there is some issue to be debugged, peek inside:
You should see a bunch of log files, at least one of which should give you a decent bit of insight into what is going on (stack traces, etc).