[patch] Java client: don't crash if jar file is on different
server
Nickolai Zeldovich
kolya "at" MIT.EDU
Wed Oct 6 07:11:00 2004
Currently if you use the Java VNC viewer applet and have the .jar file
being served by one machine, but the HTML file by another machine (i.e.
you explicitly specify another host in the <APPLET ARCHIVE=url>), the
applet crashes, because it tries to fetch a logo from the server which
served up the HTML page. This patch makes it not crash, at the very
least, so it's strictly better.
-- kolya
--- vncviewer/VNCViewer.java 2004/10/06 06:02:52 1.1
+++ vncviewer/VNCViewer.java 2004/10/06 06:03:05 1.2
@@ -108,7 +108,9 @@
public void init() {
vlog.debug("init called");
setBackground(Color.white);
- logo = getImage(getDocumentBase(), "logo150x150.gif");
+ try {
+ logo = getImage(getDocumentBase(), "logo150x150.gif");
+ } catch (Exception e) {}
}
public void start() {