diff --git a/common/rdr/SubstitutingInStream.h b/common/rdr/SubstitutingInStream.h
deleted file mode 100644
index 325b01c..0000000
--- a/common/rdr/SubstitutingInStream.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- */
-
-#ifndef __RDR_SUBSTITUTINGINSTREAM_H__
-#define __RDR_SUBSTITUTINGINSTREAM_H__
-
-#include <rdr/InStream.h>
-#include <rdr/Exception.h>
-
-namespace rdr {
-
-  class Substitutor {
-  public:
-    virtual char* substitute(const char* varName) = 0;
-  };
-
-  class SubstitutingInStream : public InStream {
-  public:
-    SubstitutingInStream(InStream* underlying_, Substitutor* s,
-                         int maxVarNameLen_)
-      : underlying(underlying_), dollar(0), substitutor(s), subst(0),
-        maxVarNameLen(maxVarNameLen_)
-    {
-      ptr = end = underlying->getptr();
-      varName = new char[maxVarNameLen+1];
-    }
-    ~SubstitutingInStream() {
-      delete underlying;
-      delete [] varName;
-      delete [] subst;
-    }
-
-    int pos() { return underlying->pos(); }
-
-    virtual int overrun(int itemSize, int nItems, bool wait=true) {
-      if (itemSize != 1)
-        throw new rdr::Exception("SubstitutingInStream: itemSize must be 1");
-
-      if (subst) {
-        delete [] subst;
-        subst = 0;
-      } else {
-        underlying->setptr(ptr);
-      }
-
-      underlying->check(1);
-      ptr = underlying->getptr();
-      end = underlying->getend();
-      dollar = (const U8*)memchr(ptr, '$', end-ptr);
-      if (dollar) {
-        if (dollar == ptr) {
-          try {
-            int i = 0;
-            while (i < maxVarNameLen) {
-              varName[i++] = underlying->readS8();
-              varName[i] = 0;
-              subst = substitutor->substitute(varName);
-              if (subst) {
-                ptr = (U8*)subst;
-                end = (U8*)subst + strlen(subst);
-                break;
-              }
-            }
-          } catch (EndOfStream&) {
-          }
-
-          if (!subst)
-            dollar = (const U8*)memchr(ptr+1, '$', end-ptr-1);
-        }
-        if (!subst && dollar) end = dollar;
-      }
-
-      if (itemSize * nItems > end - ptr)
-        nItems = (end - ptr) / itemSize;
-
-      return nItems;
-    }
-
-    InStream* underlying;
-    const U8* dollar;
-    Substitutor* substitutor;
-    char* varName;
-    char* subst;
-    int maxVarNameLen;
-  };
-}
-#endif
diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt
index 62ef401..b8d0813 100644
--- a/common/rfb/CMakeLists.txt
+++ b/common/rfb/CMakeLists.txt
@@ -21,7 +21,6 @@
   d3des.c
   EncodeManager.cxx
   Encoder.cxx
-  HTTPServer.cxx
   HextileDecoder.cxx
   HextileEncoder.cxx
   JpegCompressor.cxx
diff --git a/common/rfb/HTTPServer.cxx b/common/rfb/HTTPServer.cxx
deleted file mode 100644
index 2895a69..0000000
--- a/common/rfb/HTTPServer.cxx
+++ /dev/null
@@ -1,424 +0,0 @@
-/* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- */
-
-#include <rfb/HTTPServer.h>
-#include <rfb/LogWriter.h>
-#include <rfb/util.h>
-#include <rdr/MemOutStream.h>
-
-
-using namespace rfb;
-using namespace rdr;
-
-static LogWriter vlog("HTTPServer");
-
-const int clientWaitTimeMillis = 20000;
-const int idleTimeoutSecs = 5 * 60;
-
-
-//
-// -=- LineReader
-//     Helper class which is repeatedly called until a line has been read
-//     (lines end in \n or \r\n).
-//     Returns true when line complete, and resets internal state so that
-//     next read() call will start reading a new line.
-//     Only one buffer is kept - process line before reading next line!
-//
-
-class LineReader : public CharArray {
-public:
-  LineReader(InStream& is_, int l)
-    : CharArray(l), is(is_), pos(0), len(l), bufferOverrun(false) {}
-
-  // Returns true if line complete, false otherwise
-  bool read() {
-    while (is.checkNoWait(1)) {
-      char c = is.readU8();
-
-      if (c == '\n') {
-        if (pos && (buf[pos-1] == '\r'))
-          pos--;
-        bufferOverrun = false;
-        buf[pos++] = 0;
-        pos = 0;
-        return true;
-      }
-
-      if (pos == (len-1)) {
-        bufferOverrun = true;
-        buf[pos] = 0;
-        return true;
-      }
-
-      buf[pos++] = c;
-    }
-
-    return false;
-  }
-  bool didBufferOverrun() const {return bufferOverrun;}
-protected:
-  InStream& is;
-  int pos, len;
-  bool bufferOverrun;
-};
-
-
-//
-// -=- HTTPServer::Session
-//     Manages the internal state for an HTTP session.
-//     processHTTP returns true when request has completed,
-//     indicating that socket & session data can be deleted.
-//
-
-class rfb::HTTPServer::Session {
-public:
-  Session(network::Socket& s, rfb::HTTPServer& srv)
-    : contentType(0), contentLength(-1), lastModified(-1),
-      line(s.inStream(), 256), sock(s),
-      server(srv), state(ReadRequestLine), lastActive(time(0)) {
-  }
-  ~Session() {
-  }
-
-  void writeResponse(int result, const char* text);
-  bool writeResponse(int code);
-
-  bool processHTTP();
-
-  network::Socket* getSock() const {return &sock;}
-
-  int checkIdleTimeout();
-protected:
-  CharArray uri;
-  const char* contentType;
-  int contentLength;
-  time_t lastModified;
-  LineReader line;
-  network::Socket& sock;
-  rfb::HTTPServer& server;
-  enum {ReadRequestLine, ReadHeaders, WriteResponse} state;
-  enum {GetRequest, HeadRequest} request;
-  time_t lastActive;
-};
-
-
-// - Internal helper routines
-
-void
-copyStream(InStream& is, OutStream& os) {
-  try {
-    while (1) {
-      os.writeU8(is.readU8());
-    }
-  } catch (rdr::EndOfStream&) {
-  }
-}
-
-void writeLine(OutStream& os, const char* text) {
-  os.writeBytes(text, strlen(text));
-  os.writeBytes("\r\n", 2);
-}
-
-
-// - Write an HTTP-compliant response to the client
-
-
-void
-HTTPServer::Session::writeResponse(int result, const char* text) {
-  char buffer[1024];
-  if (strlen(text) > 512)
-    throw new rdr::Exception("Internal error - HTTP response text too big");
-  sprintf(buffer, "%s %d %s", "HTTP/1.1", result, text);
-  OutStream& os=sock.outStream();
-  writeLine(os, buffer);
-  writeLine(os, "Server: TigerVNC/4.0");
-  time_t now = time(0);
-  struct tm* tm = gmtime(&now);
-  strftime(buffer, 1024, "Date: %a, %d %b %Y %H:%M:%S GMT", tm);
-  writeLine(os, buffer);
-  if (lastModified == (time_t)-1 || lastModified == 0)
-    lastModified = now;
-  tm = gmtime(&lastModified);
-  strftime(buffer, 1024, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT", tm);
-  writeLine(os, buffer);
-  if (contentLength != -1) {
-    sprintf(buffer,"Content-Length: %d",contentLength);
-    writeLine(os, buffer);
-  }
-  writeLine(os, "Connection: close");
-  os.writeBytes("Content-Type: ", 14);
-  if (result == 200) {
-    if (!contentType)
-      contentType = guessContentType(uri.buf, "text/html");
-    os.writeBytes(contentType, strlen(contentType));
-  } else {
-    os.writeBytes("text/html", 9);
-  }
-  os.writeBytes("\r\n", 2);
-  writeLine(os, "");
-  if (result != 200) {
-    writeLine(os, "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">");
-    writeLine(os, "<HTML><HEAD>");
-    sprintf(buffer, "<TITLE>%d %s</TITLE>", result, text);
-    writeLine(os, buffer);
-    writeLine(os, "</HEAD><BODY><H1>");
-    writeLine(os, text);
-    writeLine(os, "</H1></BODY></HTML>");
-    sock.outStream().flush();
-  }
-}
-
-bool
-HTTPServer::Session::writeResponse(int code) {
-  switch (code) {
-  case 200: writeResponse(code, "OK"); break;
-  case 400: writeResponse(code, "Bad Request"); break;
-  case 404: writeResponse(code, "Not Found"); break;
-  case 501: writeResponse(code, "Not Implemented"); break;
-  default: writeResponse(500, "Unknown Error"); break;
-  };
-
-  // This return code is passed straight out of processHTTP().
-  // true indicates that the request has been completely processed.
-  return true;
-}
-
-// - Main HTTP request processing routine
-
-bool
-HTTPServer::Session::processHTTP() {
-  lastActive = time(0);
-
-  while (sock.inStream().checkNoWait(1)) {
-
-    switch (state) {
-
-      // Reading the Request-Line
-    case ReadRequestLine:
-
-      // Either read a line, or run out of incoming data
-      if (!line.read())
-        return false;
-
-      // We have read a line!  Skip it if it's blank
-      if (strlen(line.buf) == 0)
-        continue;
-
-      // The line contains a request to process.
-      {
-        char method[16], path[128], version[16];
-        int matched = sscanf(line.buf, "%15s%127s%15s",
-          method, path, version);
-        if (matched != 3)
-          return writeResponse(400);
-
-        // Store the required "method"
-        if (strcmp(method, "GET") == 0)
-          request = GetRequest;
-        else if (strcmp(method, "HEAD") == 0)
-          request = HeadRequest;
-        else
-          return writeResponse(501);
-
-        // Store the URI to the "document"
-        uri.buf = strDup(path);
-      }
-
-      // Move on to reading the request headers
-      state = ReadHeaders;
-      break;
-
-      // Reading the request headers
-    case ReadHeaders:
-
-      // Try to read a line
-      if (!line.read())
-        return false;
-
-      // Skip headers until we hit a blank line
-      if (strlen(line.buf) != 0)
-        continue;
-
-      // Headers ended - write the response!
-      {
-        CharArray address(sock.getPeerAddress());
-        vlog.info("getting %s for %s", uri.buf, address.buf);
-        contentLength = -1;
-        lastModified = -1;
-        InStream* data = server.getFile(uri.buf, &contentType, &contentLength,
-                                        &lastModified);
-        if (!data)
-          return writeResponse(404);
-
-        try {
-          writeResponse(200);
-          if (request == GetRequest)
-            copyStream(*data, sock.outStream());
-          sock.outStream().flush();
-        } catch (rdr::Exception& e) {
-          vlog.error("error writing HTTP document:%s", e.str());
-        }
-        delete data;
-      }
-
-      // The operation is complete!
-      return true;
-
-    default:
-      throw rdr::Exception("invalid HTTPSession state!");
-    };
-
-  }
-
-  // Indicate that we're still processing the HTTP request.
-  return false;
-}
-
-int HTTPServer::Session::checkIdleTimeout() {
-  time_t now = time(0);
-  int timeout = (lastActive + idleTimeoutSecs) - now;
-  if (timeout > 0)
-    return secsToMillis(timeout);
-  sock.shutdown();
-  return 0;
-}
-
-// -=- Constructor / destructor
-
-HTTPServer::HTTPServer() {
-}
-
-HTTPServer::~HTTPServer() {
-  std::list<Session*>::iterator i;
-  for (i=sessions.begin(); i!=sessions.end(); i++)
-    delete *i;
-}
-
-
-// -=- SocketServer interface implementation
-
-void
-HTTPServer::addSocket(network::Socket* sock, bool) {
-  Session* s = new Session(*sock, *this);
-  if (!s) {
-    sock->shutdown();
-  } else {
-    sock->inStream().setTimeout(clientWaitTimeMillis);
-    sock->outStream().setTimeout(clientWaitTimeMillis);
-    sessions.push_front(s);
-  }
-}
-
-void
-HTTPServer::removeSocket(network::Socket* sock) {
-  std::list<Session*>::iterator i;
-  for (i=sessions.begin(); i!=sessions.end(); i++) {
-    if ((*i)->getSock() == sock) {
-      delete *i;
-      sessions.erase(i);
-      return;
-    }
-  }
-}
-
-void
-HTTPServer::processSocketReadEvent(network::Socket* sock) {
-  std::list<Session*>::iterator i;
-  for (i=sessions.begin(); i!=sessions.end(); i++) {
-    if ((*i)->getSock() == sock) {
-      try {
-        if ((*i)->processHTTP()) {
-          vlog.info("completed HTTP request");
-          sock->shutdown();
-        }
-      } catch (rdr::Exception& e) {
-        vlog.error("untrapped: %s", e.str());
-        sock->shutdown();
-      }
-      return;
-    }
-  }
-  throw rdr::Exception("invalid Socket in HTTPServer");
-}
-
-void
-HTTPServer::processSocketWriteEvent(network::Socket* sock) {
-  std::list<Session*>::iterator i;
-  for (i=sessions.begin(); i!=sessions.end(); i++) {
-    if ((*i)->getSock() == sock) {
-      try {
-        sock->outStream().flush();
-      } catch (rdr::Exception& e) {
-        vlog.error("untrapped: %s", e.str());
-        sock->shutdown();
-      }
-      return;
-    }
-  }
-  throw rdr::Exception("invalid Socket in HTTPServer");
-}
-
-void HTTPServer::getSockets(std::list<network::Socket*>* sockets)
-{
-  sockets->clear();
-  std::list<Session*>::iterator ci;
-  for (ci = sessions.begin(); ci != sessions.end(); ci++) {
-    sockets->push_back((*ci)->getSock());
-  }
-}
-
-int HTTPServer::checkTimeouts() {
-  std::list<Session*>::iterator ci;
-  int timeout = 0;
-  for (ci = sessions.begin(); ci != sessions.end(); ci++) {
-    soonestTimeout(&timeout, (*ci)->checkIdleTimeout());
-  }
-  return timeout;
-}
-
-
-// -=- Default getFile implementation
-
-InStream*
-HTTPServer::getFile(const char* name, const char** contentType,
-                    int* contentLength, time_t* lastModified)
-{
-  return 0;
-}
-
-const char*
-HTTPServer::guessContentType(const char* name, const char* defType) {
-  CharArray file, ext;
-  if (!strSplit(name, '.', &file.buf, &ext.buf))
-    return defType;
-  if (strcasecmp(ext.buf, "html") == 0 ||
-    strcasecmp(ext.buf, "htm") == 0) {
-    return "text/html";
-  } else if (strcasecmp(ext.buf, "txt") == 0) {
-    return "text/plain";
-  } else if (strcasecmp(ext.buf, "gif") == 0) {
-    return "image/gif";
-  } else if (strcasecmp(ext.buf, "jpg") == 0) {
-    return "image/jpeg";
-  } else if (strcasecmp(ext.buf, "jar") == 0) {
-    return "application/java-archive";
-  } else if (strcasecmp(ext.buf, "exe") == 0) {
-    return "application/octet-stream";
-  }
-  return defType;
-}
diff --git a/common/rfb/HTTPServer.h b/common/rfb/HTTPServer.h
deleted file mode 100644
index 04ef499..0000000
--- a/common/rfb/HTTPServer.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- */
-
-// -=- HTTPServer.h
-
-// Single-threaded HTTP server implementation.
-// All I/O is handled by the processSocketEvent routine,
-// which is called by the main-loop of the VNC server whenever
-// there is an event on an HTTP socket.
-
-#ifndef __RFB_HTTP_SERVER_H__
-#define __RFB_HTTP_SERVER_H__
-
-#include <rdr/MemInStream.h>
-#include <rfb/UpdateTracker.h>
-#include <rfb/Configuration.h>
-#include <network/Socket.h>
-#include <time.h>
-
-namespace rfb {
-
-  class HTTPServer : public network::SocketServer {
-  public:
-    // -=- Constructors
-
-    // - HTTPServer(files)
-    //   Create an HTTP server which will use the getFile method
-    //   to satisfy HTTP GET requests.
-    HTTPServer();
-
-    virtual ~HTTPServer();
-
-    // SocketServer interface
-
-    // addSocket()
-    //   This causes the server to perform HTTP protocol on the
-    //   supplied socket.
-    virtual void addSocket(network::Socket* sock, bool outgoing=false);
-
-    // removeSocket()
-    //   Could clean up socket-specific resources here.
-    virtual void removeSocket(network::Socket* sock);
-
-    // getSockets() gets a list of sockets.  This can be used to generate an
-    // fd_set for calling select().
-    virtual void getSockets(std::list<network::Socket*>* sockets);
-
-    // processSocketReadEvent()
-    //   The platform-specific side of the server implementation calls
-    //   this method whenever data arrives on one of the active
-    //   network sockets.
-    virtual void processSocketReadEvent(network::Socket* sock);
-
-    // processSocketWriteEvent()
-    //   Similar to processSocketReadEvent(), but called when it is
-    //   possible to write more data to a socket.
-    virtual void processSocketWriteEvent(network::Socket* sock);
-
-    // Check for socket timeouts
-    virtual int checkTimeouts();
-
-
-    // -=- File interface
-
-    // - getFile is passed the path portion of a URL and returns an
-    //   InStream containing the data to return.  If the requested
-    //   file is available then the contentType should be set to the
-    //   type of the file, or left untouched if the file type is to
-    //   be determined automatically by HTTPServer.
-    //   If the file is not available then null is returned.
-    //   Overridden getFile functions should call the default version
-    //   if they do not recognise a path name.
-    //   NB: The caller assumes ownership of the returned InStream.
-    //   NB: The contentType is statically allocated by the getFile impl.
-    //   NB: contentType is *guaranteed* to be valid when getFile is called.
-
-    virtual rdr::InStream* getFile(const char* name, const char** contentType,
-                                   int* contentLength, time_t* lastModified);
-
-    // - guessContentType is passed the name of a file and returns the
-    //   name of an HTTP content type, based on the file's extension.  If
-    //   the extension isn't recognised then defType is returned.  This can
-    //   be used from getFile to easily default to the supplied contentType,
-    //   or by passing zero in to determine whether a type is recognised or
-    //   not.
-
-    static const char* guessContentType(const char* name, const char* defType);
-
-  protected:
-    class Session;
-    std::list<Session*> sessions;
-  };
-}
-
-#endif
-
diff --git a/contrib/packages/rpm/el5/SPECS/tigervnc.spec b/contrib/packages/rpm/el5/SPECS/tigervnc.spec
index 51388af..a6b363c 100644
--- a/contrib/packages/rpm/el5/SPECS/tigervnc.spec
+++ b/contrib/packages/rpm/el5/SPECS/tigervnc.spec
@@ -115,7 +115,6 @@
 
 # xorg requires newer versions of automake, & autoconf than are available with el5. Use el6 versions.
 BuildRequires: automake >= 1.11, autoconf >= 2.60, libtool >= 1.4, gettext >= 0.14.4, gettext-devel >= 0.14.4, bison-devel, python26
-BuildRequires: java-devel, jpackage-utils
 BuildRequires: pam-devel
 BuildRequires: cmake28
 BuildRequires: pkgconfig >= 0.20
@@ -247,18 +246,6 @@
 of TigerVNC server, allowing others to access the desktop on your
 machine.
 
-%package server-applet
-Summary: Java TigerVNC viewer applet for TigerVNC server
-Group: User Interface/X
-Requires: tigervnc-server, java, jpackage-utils
-%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
-BuildArch: noarch
-%endif
-
-%description server-applet
-The Java TigerVNC viewer applet for web browsers. Install this package to allow
-clients to use web browser when connect to the TigerVNC server.
-
 %package license
 Summary: License of TigerVNC suite
 Group: User Interface/X
@@ -915,21 +902,6 @@
 make
 popd
 
-# Build Java applet
-pushd java
-%{cmake28} \
-%if !%{_self_signed}
-  -DJAVA_KEYSTORE=%{_keystore} \
-  -DJAVA_KEYSTORE_TYPE=%{_keystore_type} \
-  -DJAVA_KEY_ALIAS=%{_key_alias} \
-  -DJAVA_STOREPASS=":env STOREPASS" \
-  -DJAVA_KEYPASS=":env KEYPASS" \
-  -DJAVA_TSA_URL=https://timestamp.geotrust.com/tsa .
-%endif
-
-JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make
-popd
-
 %install
 make install DESTDIR=$RPM_BUILD_ROOT
 
@@ -948,13 +920,6 @@
 install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/vncserver
 install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vncservers
 
-# Install Java applet
-pushd java
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-install -m755 VncViewer.jar $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-install -m644 com/tigervnc/vncviewer/index.vnc $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-popd
-
 %find_lang %{name} %{name}.lang
 
 %if %{_bootstrap}
@@ -1024,11 +989,6 @@
 %{_mandir}/man1/vncconfig.1*
 %{_libdir}/*
 
-%files server-applet
-%defattr(-,root,root,-)
-%doc java/com/tigervnc/vncviewer/README
-%{_datadir}/vnc/classes/*
-
 %files license
 %defattr(-,root,root,-)
 %doc LICENCE.TXT
diff --git a/contrib/packages/rpm/el6/SPECS/tigervnc.spec b/contrib/packages/rpm/el6/SPECS/tigervnc.spec
index 09843b2..5019399 100644
--- a/contrib/packages/rpm/el6/SPECS/tigervnc.spec
+++ b/contrib/packages/rpm/el6/SPECS/tigervnc.spec
@@ -37,7 +37,6 @@
 BuildRequires: libxkbfile-devel, openssl-devel, libpciaccess-devel
 BuildRequires: mesa-libGL-devel, libXinerama-devel, ImageMagick
 BuildRequires: freetype-devel, libXdmcp-devel
-BuildRequires: java-devel, jpackage-utils
 BuildRequires: libjpeg-turbo-devel, pam-devel
 BuildRequires: cmake >= 2.8
 %if !%{_bootstrap}
@@ -120,16 +119,6 @@
 to access the desktop on your machine.
 %endif
 
-%package server-applet
-Summary: Java TigerVNC viewer applet for TigerVNC server
-Group: User Interface/X
-Requires: tigervnc-server, java, jpackage-utils
-BuildArch: noarch
-
-%description server-applet
-The Java TigerVNC viewer applet for web browsers. Install this package to allow
-clients to use web browser when connect to the TigerVNC server.
-
 %package license
 Summary: License of TigerVNC suite
 Group: User Interface/X
@@ -326,21 +315,6 @@
 make
 popd
 
-# Build Java applet
-pushd java
-%{cmake} \
-%if !%{_self_signed}
-	-DJAVA_KEYSTORE=%{_keystore} \
-	-DJAVA_KEYSTORE_TYPE=%{_keystore_type} \
-	-DJAVA_KEY_ALIAS=%{_key_alias} \
-	-DJAVA_STOREPASS=":env STOREPASS" \
-	-DJAVA_KEYPASS=":env KEYPASS" \
-	-DJAVA_TSA_URL=http://timestamp.geotrust.com/tsa .
-%endif
-
-make
-popd
-
 %install
 %if %{_bootstrap}
 for l in gmp libtasn1 nettle gnutls libpng fltk; do
@@ -364,13 +338,6 @@
 install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/vncserver
 install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vncservers
 
-# Install Java applet
-pushd java
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-install -m755 VncViewer.jar $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-install -m644 com/tigervnc/vncviewer/index.vnc $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-popd
-
 %find_lang %{name} %{name}.lang
 
 # remove unwanted files
@@ -433,11 +400,6 @@
 %{_libdir}/xorg/modules/extensions/libvnc.so
 %endif
 
-%files server-applet
-%defattr(-,root,root,-)
-%doc java/com/tigervnc/vncviewer/README
-%{_datadir}/vnc/classes/*
-
 %files license
 %defattr(-,root,root,-)
 %doc LICENCE.TXT
diff --git a/contrib/packages/rpm/el7/SPECS/tigervnc.spec b/contrib/packages/rpm/el7/SPECS/tigervnc.spec
index ec36ccc..1b8630a 100644
--- a/contrib/packages/rpm/el7/SPECS/tigervnc.spec
+++ b/contrib/packages/rpm/el7/SPECS/tigervnc.spec
@@ -32,7 +32,6 @@
 BuildRequires:  libxkbfile-devel, openssl-devel, libpciaccess-devel
 BuildRequires:  mesa-libGL-devel, libXinerama-devel, ImageMagick
 BuildRequires:  freetype-devel, libXdmcp-devel, libXfont2-devel
-BuildRequires:  java-devel, jpackage-utils
 BuildRequires:  libjpeg-turbo-devel, gnutls-devel, pam-devel
 BuildRequires:  systemd, cmake
 
@@ -114,16 +113,6 @@
 to access the desktop on your machine.
 %endif
 
-%package server-applet
-Summary:        Java TigerVNC viewer applet for TigerVNC server
-Group:          User Interface/X
-Requires:       tigervnc-server, java, jpackage-utils
-BuildArch:      noarch
-
-%description server-applet
-The Java TigerVNC viewer applet for web browsers. Install this package to allow
-clients to use web browser when connect to the TigerVNC server.
-
 %package license
 Summary:        License of TigerVNC suite
 Group:          User Interface/X
@@ -250,21 +239,6 @@
 make
 popd
 
-# Build Java applet
-pushd java
-%{cmake} \
-%if !%{_self_signed}
-	-DJAVA_KEYSTORE=%{_keystore} \
-	-DJAVA_KEYSTORE_TYPE=%{_keystore_type} \
-	-DJAVA_KEY_ALIAS=%{_key_alias} \
-	-DJAVA_STOREPASS=":env STOREPASS" \
-	-DJAVA_KEYPASS=":env KEYPASS" \
-	-DJAVA_TSA_URL=http://timestamp.geotrust.com/tsa .
-%endif
-
-make
-popd
-
 %install
 %if %{_bootstrap}
 for l in fltk; do
@@ -291,13 +265,6 @@
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vncservers
 
-# Install Java applet
-pushd java
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-install -m755 VncViewer.jar $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-install -m644 com/tigervnc/vncviewer/index.vnc $RPM_BUILD_ROOT%{_datadir}/vnc/classes
-popd
-
 %find_lang %{name} %{name}.lang
 
 # remove unwanted files
@@ -370,11 +337,6 @@
 %config %{_sysconfdir}/X11/xorg.conf.d/10-libvnc.conf
 %endif
 
-%files server-applet
-%defattr(-,root,root,-)
-%doc java/com/tigervnc/vncviewer/README
-%{_datadir}/vnc/classes/*
-
 %files license
 %doc %{_docdir}/%{name}-%{version}/LICENCE.TXT
 
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 340dec1..23137f7 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -177,12 +177,3 @@
     -P ${SRCDIR}/cmake/SignJar.cmake)
 
 add_custom_target(java ALL DEPENDS VncViewer.jar)
-
-if(NOT WIN32)
-  install(FILES
-    ${BINDIR}/VncViewer.jar
-    ${SRCDIR}/${CLASSPATH}/README
-    ${SRCDIR}/${CLASSPATH}/index.vnc
-    ${SRCDIR}/${CLASSPATH}/favicon.ico
-    DESTINATION ${DATA_DIR}/vnc/classes)
-endif()
diff --git a/java/com/tigervnc/vncviewer/README b/java/com/tigervnc/vncviewer/README
index d0baa93..3019f8d 100644
--- a/java/com/tigervnc/vncviewer/README
+++ b/java/com/tigervnc/vncviewer/README
@@ -27,86 +27,24 @@
 Installation
 ============
 
-There are three basic ways to use the TigerVNC Java Viewer:
+The TigerVNC Java Viewer requires installation of either a JRE (Java
+Runtime Environment) or a JDK (Java Development Kit).  If VncViewer.jar is
+in the current directory, then the TigerVNC Java Viewer can be launched
+with the following command line:
 
-  1. Running the applet as part of a TigerVNC Server installation.
+   java -jar VncViewer.jar [parameters]
 
-     Both the Unix and Windows versions of the TigerVNC Server include a small
-     built-in HTTP server that can serve the TigerVNC Java Viewer to web
-     clients.  This enables easy access to the shared desktop without the need
-     to install any software on the client machine.
-
-     The Unix TigerVNC Server (Xvnc) is able to serve up any set of files that
-     are present in a particular directory, which is specified in the -httpd
-     argument to Xvnc.  The default version of the vncserver script will look
-     for a directory called vnc/classes, one level up from the directory
-     containing the vncserver script, then it will look for a directory called
-     /usr/share/vnc/classes, then /usr/local/vnc/classes.  It will set the
-     -httpd argument to Xvnc to the first one of these VNC classes directories
-     it finds.  Thus, one can easily deploy a modified version of the TigerVNC
-     Java Viewer by simply copying a new version of VncViewer.jar and/or
-     index.vnc into the VNC classes directory.
-
-     On Windows and Linux, the embedded applet can be drag-undocked from the 
-     browser window and converted to a standalone application. The drag
-     gesture ALT+drag on Windows, and SHIFT+drag on Linux.
-
-     In the case of the Windows TigerVNC Server, VncViewer.jar and index.vnc
-     are embedded as resources in the WinVNC executable, so deploying a
-     modified version of the TigerVNC Java Viewer on a Windows server requires
-     rebuilding WinVNC.
-
-  2. Running the applet from a standalone web server.
-
-     Another possibility for using the TigerVNC Java Viewer is to install it
-     under a fully-functional HTTP server, such as Apache or IIS.  Due to Java
-     security restrictions, the applet must be signed in order for it to
-     connect to a VNC server running on a different machine from the HTTP
-     server.
-
-     One can install the TigerVNC Java Viewer by simply copying the .class and
-     .jar files into a directory that is under the control of the HTTP server.
-     Also, an HTML page should be created to act as a the base document for the
-     TigerVNC Java Viewer applet (an example named index.html is provided in
-     this directory.  Modify this file to suit your specific needs.)
-
-  3. Running the viewer as a standalone application.
-
-     Finally, the TigerVNC Java Viewer can be executed locally on the client
-     machine, but this method requires installation of either a JRE (Java
-     Runtime Environment) or a JDK (Java Development Kit).  If VncViewer.jar is
-     in the current directory, then the TigerVNC Java Viewer can be launched
-     with the following command line:
-
-         java -jar VncViewer.jar [parameters]
-
-     Add an argument of -? to the above command line to print a list of
-     optional parameters supported by VncViewer.
+Add an argument of -? to the above command line to print a list of
+optional parameters supported by VncViewer.
 
 
 Parameters
 ==========
 
 The TigerVNC Java Viewer accepts a number of optional parameters, allowing you
-to customize its behavior.
+to customize its behavior. Example:
 
-Parameters can be specified in one of the two ways, depending on how the
-TigerVNC Java Viewer is used:
-
-  1. When the TigerVNC Java Viewer is run as an applet (embedded within an HTML
-     document), parameters should be specified using the <PARAM> HTML tags
-     within the appropriate <APPLET> section.  Example:
-
-    <APPLET CODE=com.tigervnc.vncviewer.VncViewer ARCHIVE=VncViewer.jar
-      WIDTH=400 HEIGHT=300>
-      <PARAM NAME="PORT" VALUE=5901>
-      <PARAM NAME="ScalingFactor" VALUE=50>
-    </APPLET>
-
-  2. When run as a standalone application, the TigerVNC Java Viewer reads
-     parameters from the command line.  Example:
-
-     java -jar VncViewer.jar Port=5901 ScalingFactor=50
+  java -jar VncViewer.jar Port=5901 ScalingFactor=50
 
 Both parameter names and their values are case-insensitive.
 
diff --git a/java/com/tigervnc/vncviewer/favicon.ico b/java/com/tigervnc/vncviewer/favicon.ico
deleted file mode 100644
index edbd467..0000000
--- a/java/com/tigervnc/vncviewer/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/java/com/tigervnc/vncviewer/index.html b/java/com/tigervnc/vncviewer/index.html
deleted file mode 100644
index ba00e26..0000000
--- a/java/com/tigervnc/vncviewer/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- 
-     index.html - an example HTML page for the TigerVNC Java Viewer applet, to
-     be used with a standalone web server.  Before using this example, please
-     MAKE SURE to check the following:
-
-     * the CODE and ARCHIVE attributes of the <APPLET> tag should point to
-       the correct directory (this example assumes that this page is in the
-       same directory as VncViewer.jar);
--->
-
-<HTML>
-<TITLE>
-TigerVNC desktop
-</TITLE>
-<APPLET CODE="com.tigervnc.vncviewer.VncViewer" ARCHIVE="VncViewer.jar"
-        WIDTH=500>
-</APPLET>
-<BR>
-<A href="http://www.tigervnc.org/">TigerVNC site</A>
-</HTML>
diff --git a/java/com/tigervnc/vncviewer/index.vnc b/java/com/tigervnc/vncviewer/index.vnc
deleted file mode 100644
index 27bdebc..0000000
--- a/java/com/tigervnc/vncviewer/index.vnc
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- 
-     index.vnc - default HTML page for TigerVNC Java viewer applet, to be
-     used with Xvnc. On any file ending in .vnc, the HTTP server embedded in
-     Xvnc will substitute the following variables when preceded by a dollar:
-     USER, DESKTOP, DISPLAY, APPLETWIDTH, APPLETHEIGHT, WIDTH, HEIGHT, PORT,
-     Use two dollar signs ($$) to get a dollar sign in the generated
-     HTML page.
--->
-
-<HTML>
-<TITLE>
-$USER's $DESKTOP desktop ($DISPLAY)
-</TITLE>
-<APPLET CODE=com.tigervnc.vncviewer.VncViewer ARCHIVE=VncViewer.jar
-        WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT>
-<param name=PORT value=$PORT>
-<param name="Embed" value="true">
-<param name="draggable" value="true">
-</APPLET>
-<BR>
-<A href="http://www.tigervnc.org/">TigerVNC site</A>
-</HTML>
diff --git a/unix/vncserver b/unix/vncserver
index 9e7a6ac..bb4f2fe 100755
--- a/unix/vncserver
+++ b/unix/vncserver
@@ -33,8 +33,6 @@
     $exedir = substr($0, 0, $slashndx+1);
 }
 
-$vncClasses = "";
-
 &SanityCheck();
 
 #
@@ -44,9 +42,6 @@
 
 $geometry = "1024x768";
 #$depth = 16;
-$vncJavaFiles = (((-d "$vncClasses") && "$vncClasses") ||
-                 ((-d "/usr/share/vnc/classes") && "/usr/share/vnc/classes") ||
-                 ((-d "/usr/local/vnc/classes") && "/usr/local/vnc/classes"));
 
 $vncUserDir = "$ENV{HOME}/.vnc";
 $vncUserConfig = "$vncUserDir/config";
@@ -206,7 +201,6 @@
 # We set some reasonable defaults. Config file settings
 # override these where present.
 $default_opts{desktop} = &quotedString($desktopName);
-$default_opts{httpd} = $vncJavaFiles if ($vncJavaFiles);
 $default_opts{auth} = &quotedString($xauthorityFile);
 $default_opts{geometry} = $geometry if ($geometry);
 $default_opts{depth} = $depth if ($depth);
@@ -848,7 +842,6 @@
 	foreach $cmd ("Xvnc","vncpasswd") {
 	    for (split(/:/,$ENV{PATH})) {
 		if (-x "$_/$cmd") {
-		    $vncClasses = "$_/../vnc/classes";
 		    next cmd2;
 		}
 	    }
@@ -860,7 +853,6 @@
 	foreach $cmd ($exedir."Xvnc",$exedir."vncpasswd") {
 	    for (split(/:/,$ENV{PATH})) {
 		if (-x "$cmd") {
-		    $vncClasses = $exedir."../vnc/classes";
 		    next cmd3;
 		}
 	    }
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 7eaf3f9..04107dc 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -35,7 +35,6 @@
 #include <network/Socket.h>
 #include <rfb/Exception.h>
 #include <rfb/VNCServerST.h>
-#include <rfb/HTTPServer.h>
 #include <rfb/LogWriter.h>
 #include <rfb/Configuration.h>
 #include <rfb/ServerCore.h>
@@ -67,54 +66,14 @@
                                  "rejecting the connection",
                                  10);
 
-class FileHTTPServer : public rfb::HTTPServer {
-public:
-  FileHTTPServer(XserverDesktop* d) : desktop(d) {}
-  virtual ~FileHTTPServer() {}
-
-  virtual rdr::InStream* getFile(const char* name, const char** contentType,
-                                 int* contentLength, time_t* lastModified)
-  {
-    if (name[0] != '/' || strstr(name, "..") != 0) {
-      vlog.info("http request was for invalid file name");
-      return 0;
-    }
-
-    if (strcmp(name, "/") == 0) name = "/index.vnc";
-
-    CharArray httpDirStr(httpDir.getData());
-    CharArray fname(strlen(httpDirStr.buf)+strlen(name)+1);
-    sprintf(fname.buf, "%s%s", httpDirStr.buf, name);
-    int fd = open(fname.buf, O_RDONLY);
-    if (fd < 0) return 0;
-    rdr::InStream* is = new rdr::FdInStream(fd, -1, 0, true);
-    *contentType = guessContentType(name, *contentType);
-    if (strlen(name) > 4 && strcasecmp(&name[strlen(name)-4], ".vnc") == 0) {
-      is = new rdr::SubstitutingInStream(is, desktop, 20);
-      *contentType = "text/html";
-    } else {
-      struct stat st;
-      if (fstat(fd, &st) == 0) {
-        *contentLength = st.st_size;
-        *lastModified = st.st_mtime;
-      }
-    }
-    return is;
-  }
-
-  XserverDesktop* desktop;
-};
-
 
 XserverDesktop::XserverDesktop(int screenIndex_,
                                std::list<network::SocketListener*> listeners_,
-                               std::list<network::SocketListener*> httpListeners_,
                                const char* name, const rfb::PixelFormat &pf,
                                int width, int height,
                                void* fbptr, int stride)
   : screenIndex(screenIndex_),
-    server(0), httpServer(0),
-    listeners(listeners_), httpListeners(httpListeners_),
+    server(0), listeners(listeners_),
     directFbptr(true),
     queryConnectId(0), queryConnectTimer(this)
 {
@@ -124,20 +83,11 @@
   setFramebuffer(width, height, fbptr, stride);
   server->setQueryConnectionHandler(this);
 
-  if (!httpListeners.empty ())
-    httpServer = new FileHTTPServer(this);
-
   for (std::list<SocketListener*>::iterator i = listeners.begin();
        i != listeners.end();
        i++) {
     vncSetNotifyFd((*i)->getFd(), screenIndex, true, false);
   }
-
-  for (std::list<SocketListener*>::iterator i = httpListeners.begin();
-       i != httpListeners.end();
-       i++) {
-    vncSetNotifyFd((*i)->getFd(), screenIndex, true, false);
-  }
 }
 
 XserverDesktop::~XserverDesktop()
@@ -147,14 +97,8 @@
     delete listeners.back();
     listeners.pop_back();
   }
-  while (!httpListeners.empty()) {
-    vncRemoveNotifyFd(listeners.back()->getFd());
-    delete httpListeners.back();
-    httpListeners.pop_back();
-  }
   if (!directFbptr)
     delete [] data;
-  delete httpServer;
   delete server;
 }
 
@@ -201,56 +145,6 @@
   server->setScreenLayout(::computeScreenLayout(&outputIdMap));
 }
 
-char* XserverDesktop::substitute(const char* varName)
-{
-  if (strcmp(varName, "$$") == 0) {
-    return rfb::strDup("$");
-  }
-  if (strcmp(varName, "$PORT") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", listeners.empty () ? 0 : (*listeners.begin ())->getMyPort());
-    return str;
-  }
-  if (strcmp(varName, "$WIDTH") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", width());
-    return str;
-  }
-  if (strcmp(varName, "$HEIGHT") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", height());
-    return str;
-  }
-  if (strcmp(varName, "$APPLETWIDTH") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", width());
-    return str;
-  }
-  if (strcmp(varName, "$APPLETHEIGHT") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", height());
-    return str;
-  }
-  if (strcmp(varName, "$DESKTOP") == 0) {
-    return rfb::strDup(server->getName());
-  }
-  if (strcmp(varName, "$DISPLAY") == 0) {
-    struct utsname uts;
-    uname(&uts);
-    char* str = new char[256];
-    strncpy(str, uts.nodename, 240);
-    str[239] = '\0'; /* Ensure string is zero-terminated */
-    strcat(str, ":");
-    strncat(str, vncGetDisplay(), 10);
-    return str;
-  }
-  if (strcmp(varName, "$USER") == 0) {
-    struct passwd* user = getpwuid(getuid());
-    return rfb::strDup(user ? user->pw_name : "?");
-  }
-  return 0;
-}
-
 rfb::VNCServerST::queryResult
 XserverDesktop::queryConnection(network::Socket* sock,
                                 const char* userName,
@@ -370,14 +264,10 @@
     if (read) {
       if (handleListenerEvent(fd, &listeners, server))
         return;
-      if (handleListenerEvent(fd, &httpListeners, httpServer))
-        return;
     }
 
     if (handleSocketEvent(fd, server, read, write))
       return;
-    if (handleSocketEvent(fd, httpServer, read, write))
-      return;
 
     vlog.error("Cannot find file descriptor for socket event");
   } catch (rdr::Exception& e) {
@@ -458,21 +348,6 @@
         vncSetNotifyFd(fd, screenIndex, true, (*i)->outStream().bufferUsage() > 0);
       }
     }
-    if (httpServer) {
-      httpServer->getSockets(&sockets);
-      for (i = sockets.begin(); i != sockets.end(); i++) {
-        int fd = (*i)->getFd();
-        if ((*i)->isShutdown()) {
-          vlog.debug("http client gone, sock %d",fd);
-          vncRemoveNotifyFd(fd);
-          httpServer->removeSocket(*i);
-          delete (*i);
-        } else {
-          /* Update existing NotifyFD to listen for write (or not) */
-          vncSetNotifyFd(fd, screenIndex, true, (*i)->outStream().bufferUsage() > 0);
-        }
-      }
-    }
 
     // We are responsible for propagating mouse movement between clients
     int cursorX, cursorY;
diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
index f866a4c..014fcb5 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.h
+++ b/unix/xserver/hw/vnc/XserverDesktop.h
@@ -32,11 +32,9 @@
 #include <stdint.h>
 
 #include <rfb/SDesktop.h>
-#include <rfb/HTTPServer.h>
 #include <rfb/PixelBuffer.h>
 #include <rfb/Configuration.h>
 #include <rfb/VNCServerST.h>
-#include <rdr/SubstitutingInStream.h>
 #include <unixcommon.h>
 #include "Input.h"
 
@@ -47,14 +45,12 @@
 namespace network { class SocketListener; class Socket; class SocketServer; }
 
 class XserverDesktop : public rfb::SDesktop, public rfb::FullFramePixelBuffer,
-                       public rdr::Substitutor,
                        public rfb::VNCServerST::QueryConnectionHandler,
                        public rfb::Timer::Callback {
 public:
 
   XserverDesktop(int screenIndex,
                  std::list<network::SocketListener*> listeners_,
-                 std::list<network::SocketListener*> httpListeners_,
                  const char* name, const rfb::PixelFormat &pf,
                  int width, int height, void* fbptr, int stride);
   virtual ~XserverDesktop();
@@ -99,9 +95,6 @@
   // rfb::PixelBuffer callbacks
   virtual void grabRegion(const rfb::Region& r);
 
-  // rdr::Substitutor callback
-  virtual char* substitute(const char* varName);
-
   // rfb::VNCServerST::QueryConnectionHandler callback
   virtual rfb::VNCServerST::queryResult queryConnection(network::Socket* sock,
                                                         const char* userName,
@@ -121,9 +114,7 @@
 
   int screenIndex;
   rfb::VNCServerST* server;
-  rfb::HTTPServer* httpServer;
   std::list<network::SocketListener*> listeners;
-  std::list<network::SocketListener*> httpListeners;
   bool directFbptr;
 
   uint32_t queryConnectId;
diff --git a/unix/xserver/hw/vnc/Xvnc.man b/unix/xserver/hw/vnc/Xvnc.man
index 269be9a..28786af 100644
--- a/unix/xserver/hw/vnc/Xvnc.man
+++ b/unix/xserver/hw/vnc/Xvnc.man
@@ -107,19 +107,6 @@
 mean an update will be aborted after this time.  Default is 20000 (20 seconds).
 .
 .TP
-.B \-httpd \fIdirectory\fP
-Run a mini-HTTP server which serves files from the given directory.  Normally
-the directory will contain the classes for the Java viewer.  In addition, files
-with a .vnc extension will have certain substitutions made so that a single
-installation of the Java VNC viewer can be served by separate instances of
-Xvnc.
-.
-.TP
-.B \-httpPort \fIport\fP
-Specifies the port on which the mini-HTTP server runs.  Default is 5800 plus
-the display number.
-.
-.TP
 .B \-rfbauth \fIpasswd-file\fP, \-PasswordFile \fIpasswd-file\fP
 Password file for VNC authentication.  There is no default, you should
 specify the password file explicitly.  Password file should be created with
diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc
index d6f6b74..286a04f 100644
--- a/unix/xserver/hw/vnc/vncExtInit.cc
+++ b/unix/xserver/hw/vnc/vncExtInit.cc
@@ -73,10 +73,6 @@
 typedef std::set<std::string, CaseInsensitiveCompare> ParamSet;
 static ParamSet allowOverrideSet;
 
-rfb::StringParameter httpDir("httpd",
-                             "Directory containing files to serve via HTTP",
-                             "");
-rfb::IntParameter httpPort("httpPort", "TCP port to listen for HTTP",0);
 rfb::AliasParameter rfbwait("rfbwait", "Alias for ClientWaitTimeMillis",
                             &rfb::Server::clientWaitTimeMillis);
 rfb::IntParameter rfbport("rfbport", "TCP port to listen for RFB protocol",0);
@@ -177,7 +173,6 @@
 
       if (!desktop[scr]) {
         std::list<network::SocketListener*> listeners;
-        std::list<network::SocketListener*> httpListeners;
         if (scr == 0 && vncInetdSock != -1) {
           if (network::isSocketListening(vncInetdSock))
           {
@@ -214,21 +209,6 @@
           vlog.info("Listening for VNC connections on %s interface(s), port %d",
                     localhostOnly ? "local" : (const char*)interface,
                     port);
-
-          CharArray httpDirStr(httpDir.getData());
-          if (httpDirStr.buf[0]) {
-            port = httpPort;
-            if (port == 0) port = 5800 + atoi(vncGetDisplay());
-            port += 1000 * scr;
-            if (localhostOnly)
-              network::createLocalTcpListeners(&httpListeners, port);
-            else
-              network::createTcpListeners(&httpListeners, addr, port);
-
-            vlog.info("Listening for HTTP connections on %s interface(s), port %d",
-                      localhostOnly ? "local" : (const char*)interface,
-                      port);
-          }
         }
 
         CharArray desktopNameStr(desktopName.getData());
@@ -237,7 +217,6 @@
         vncSetGlueContext(scr);
         desktop[scr] = new XserverDesktop(scr,
                                           listeners,
-                                          httpListeners,
                                           desktopNameStr.buf,
                                           pf,
                                           vncGetScreenWidth(),
diff --git a/unix/xserver/hw/vnc/vncExtInit.h b/unix/xserver/hw/vnc/vncExtInit.h
index 9414723..5f97f96 100644
--- a/unix/xserver/hw/vnc/vncExtInit.h
+++ b/unix/xserver/hw/vnc/vncExtInit.h
@@ -23,13 +23,6 @@
 #include <stddef.h>
 #include <sys/select.h>
 
-// Only from C++
-#ifdef __cplusplus
-namespace rfb { class StringParameter; };
-
-extern rfb::StringParameter httpDir;
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index ad55d49..9b2cbb0 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -314,21 +314,6 @@
 }
 
 
-Point SDisplay::getFbSize() {
-  bool startAndStop = !core;
-
-  // If not started, do minimal initialisation to get desktop size.
-  if (startAndStop)
-    recreatePixelBuffer();
-  Point result = Point(pb->width(), pb->height());
-
-  // Destroy the initialised structures.
-  if (startAndStop)
-    stopCore();
-  return result;
-}
-
-
 void
 SDisplay::notifyClipboardChanged(const char* text, int len) {
   vlog.debug("clipboard text changed");
diff --git a/win/rfb_win32/SDisplay.h b/win/rfb_win32/SDisplay.h
index f36b2b7..c1d5c1e 100644
--- a/win/rfb_win32/SDisplay.h
+++ b/win/rfb_win32/SDisplay.h
@@ -86,12 +86,6 @@
 
       void setStatusLocation(bool* status) {statusLocation = status;}
 
-      // -=- Used (indirectly) by JavaViewer to get desktop size
-
-      Point getFbSize();
-
-      friend class SDisplayCore;
-
       static IntParameter updateMethod;
       static BoolParameter disableLocalInputs;
       static StringParameter disconnectAction;
diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h
index b3402ab..c3d6737 100644
--- a/win/vncconfig/Connections.h
+++ b/win/vncconfig/Connections.h
@@ -27,8 +27,6 @@
 #include <rfb/Blacklist.h>
 #include <network/TcpSocket.h>
 
-static rfb::IntParameter http_port("HTTPPortNumber",
-  "TCP/IP port on which the server will serve the Java applet VNC Viewer ", 5800);
 static rfb::IntParameter port_number("PortNumber",
   "TCP/IP port on which the server will accept connections", 5900);
 static rfb::StringParameter hosts("Hosts",
@@ -96,10 +94,6 @@
         setItemInt(IDC_PORT, port_number ? port_number : 5900);
         setItemChecked(IDC_RFB_ENABLE, port_number != 0);
         setItemInt(IDC_IDLE_TIMEOUT, rfb::Server::idleTimeout);
-        vlog.debug("set IDC_HTTP_PORT %d", (int)http_port);
-        setItemInt(IDC_HTTP_PORT, http_port ? http_port : 5800);
-        setItemChecked(IDC_HTTP_ENABLE, http_port != 0);
-        enableItem(IDC_HTTP_PORT, http_port != 0);
         setItemChecked(IDC_LOCALHOST, localHost);
 
         HWND listBox = GetDlgItem(handle, IDC_HOSTS);
@@ -133,26 +127,14 @@
           return true;
 
         case IDC_PORT:
-          if (cmd == EN_CHANGE) {
-            try {
-              setItemInt(IDC_HTTP_PORT, rfbPortToHTTP(getItemInt(IDC_PORT)));
-            } catch (...) {
-            }
-          }
-        case IDC_HTTP_PORT:
         case IDC_IDLE_TIMEOUT:
           if (cmd == EN_CHANGE)
             setChanged(isChanged());
           return false;
 
-        case IDC_HTTP_ENABLE:
         case IDC_RFB_ENABLE:
         case IDC_LOCALHOST:
           {
-            // HTTP port
-            enableItem(IDC_HTTP_PORT, isItemChecked(IDC_HTTP_ENABLE) && isItemChecked(IDC_RFB_ENABLE));
-            enableItem(IDC_HTTP_ENABLE, isItemChecked(IDC_RFB_ENABLE));
-
             // RFB port
             enableItem(IDC_PORT, isItemChecked(IDC_RFB_ENABLE));
 
@@ -245,8 +227,6 @@
       bool onOk() {
         regKey.setInt(_T("PortNumber"), isItemChecked(IDC_RFB_ENABLE) ? getItemInt(IDC_PORT) : 0);
         regKey.setInt(_T("IdleTimeout"), getItemInt(IDC_IDLE_TIMEOUT));
-        regKey.setInt(_T("HTTPPortNumber"), isItemChecked(IDC_HTTP_ENABLE) && isItemChecked(IDC_RFB_ENABLE)
-                                            ? getItemInt(IDC_HTTP_PORT) : 0);
         regKey.setInt(_T("LocalHost"), isItemChecked(IDC_LOCALHOST));
         regKey.setString(_T("Hosts"), TCharArray(getHosts()).buf);
         return true;
@@ -258,8 +238,6 @@
           return (strcmp(new_hosts.buf, old_hosts.buf) != 0) ||
               (localHost != isItemChecked(IDC_LOCALHOST)) ||
               (port_number != getItemInt(IDC_PORT)) ||
-              (http_port != getItemInt(IDC_HTTP_PORT)) ||
-              ((http_port!=0) != (isItemChecked(IDC_HTTP_ENABLE)!=0)) ||
               (rfb::Server::idleTimeout != getItemInt(IDC_IDLE_TIMEOUT));
         } catch (rdr::Exception&) {
           return false;
@@ -281,15 +259,6 @@
         }
         return strDup(hosts_str.buf);
       }
-      int rfbPortToHTTP(int rfbPort) {
-        int offset = -100;
-        if (http_port)
-          offset = http_port - port_number;
-        int httpPort = rfbPort + offset;
-        if (httpPort <= 0)
-          httpPort = rfbPort;
-        return httpPort;
-      }
 
     protected:
       RegKey regKey;
diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx
index b56eb37..deba0ff 100644
--- a/win/vncconfig/Legacy.cxx
+++ b/win/vncconfig/Legacy.cxx
@@ -192,10 +192,6 @@
 
       void LegacyPage::LoadUserPrefs(const RegKey& key)
       {
-        if (key.getBool(_T("HTTPConnect"), true))
-          regKey.setInt(_T("HTTPPortNumber"), key.getInt(_T("PortNumber"), 5900)-100);
-        else
-          regKey.setInt(_T("HTTPPortNumber"), 0);
         regKey.setInt(_T("PortNumber"), key.getBool(_T("SocketConnect")) ? key.getInt(_T("PortNumber"), 5900) : 0);
         if (key.getBool(_T("AutoPortSelect"), false)) {
           MsgBox(0, _T("The AutoPortSelect setting is not supported by this release.")
diff --git a/win/vncconfig/resource.h b/win/vncconfig/resource.h
index 16bbc15..7350f5b 100644
--- a/win/vncconfig/resource.h
+++ b/win/vncconfig/resource.h
@@ -52,8 +52,6 @@
 #define IDC_BUILDTIME                   1040
 #define IDC_VERSION                     1041
 #define IDC_COPYRIGHT                   1042
-#define IDC_HTTP_ENABLE                 1043
-#define IDC_HTTP_PORT                   1044
 #define IDC_BL_THRESHOLD                1046
 #define IDC_BL_TIMEOUT                  1047
 #define IDC_AFFECT_SCREENSAVER          1048
diff --git a/win/vncconfig/vncconfig.rc b/win/vncconfig/vncconfig.rc
index 27a8b5d..8d9a6c2 100644
--- a/win/vncconfig/vncconfig.rc
+++ b/win/vncconfig/vncconfig.rc
@@ -110,9 +110,6 @@
     LTEXT           "Disconnect idle clients after (seconds):",IDC_STATIC,7,
                     25,138,15,SS_CENTERIMAGE
     EDITTEXT        IDC_IDLE_TIMEOUT,150,25,61,15,ES_AUTOHSCROLL | ES_NUMBER
-    CONTROL         "Serve Java viewer via HTTP on port:",IDC_HTTP_ENABLE,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,40,138,15
-    EDITTEXT        IDC_HTTP_PORT,150,40,61,15,ES_AUTOHSCROLL | ES_NUMBER
     GROUPBOX        "Access Control",IDC_STATIC,7,55,204,135
     CONTROL         "Only accept connections from the local machine",
                     IDC_LOCALHOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,
diff --git a/win/winvnc/CMakeLists.txt b/win/winvnc/CMakeLists.txt
index ac9ae29..113796c 100644
--- a/win/winvnc/CMakeLists.txt
+++ b/win/winvnc/CMakeLists.txt
@@ -1,29 +1,18 @@
 include_directories(${CMAKE_BINARY_DIR}/win ${CMAKE_CURRENT_SOURCE_DIR})
 
-set(VNCVIEWER_JAR_PATH ${CMAKE_BINARY_DIR}/java/VncViewer.jar)
-set(INDEX_VNC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/index.vnc)
-
-configure_file(winvnc.rc.in winvnc.rc)
-
 add_executable(winvnc4 WIN32
   buildTime.cxx
   ControlPanel.cxx
-  JavaViewer.cxx
   ManagedListener.cxx
   QueryConnectDialog.cxx
   STrayIcon.cxx
   VNCServerService.cxx
   VNCServerWin32.cxx
   winvnc.cxx
-  ${CMAKE_CURRENT_BINARY_DIR}/winvnc.rc)
+  winvnc.rc)
 
 target_link_libraries(winvnc4 rfb rfb_win32 network rdr ws2_32.lib)
 
-if(BUILD_JAVA)
-  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/winvnc.rc
-    PROPERTIES OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/java/VncViewer.jar)
-endif()
-
 install(TARGETS winvnc4
   RUNTIME DESTINATION ${BIN_DIR}
 )
diff --git a/win/winvnc/JavaViewer.cxx b/win/winvnc/JavaViewer.cxx
deleted file mode 100644
index e2e307e..0000000
--- a/win/winvnc/JavaViewer.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- */
-
-#include <winvnc/JavaViewer.h>
-#include <winvnc/VNCServerWin32.h>
-#include <winvnc/resource.h>
-#include <rdr/MemInStream.h>
-#include <rfb/LogWriter.h>
-#include <rfb/VNCServerST.h>
-#include <rfb_win32/TCharArray.h>
-
-#include <windows.h>
-
-using namespace winvnc;
-using namespace rfb;
-
-
-static rfb::LogWriter vlog("JavaViewerServer");
-
-JavaViewerServer::JavaViewerServer(VNCServerWin32* svr) : server(svr) {
-}
-
-JavaViewerServer::~JavaViewerServer() {
-}
-
-rdr::InStream* JavaViewerServer::getFile(const char* name,
-                                         const char** contentType,
-                                         int* contentLength,
-                                         time_t* lastModified)
-{
-  if (strcmp(name, "/") == 0)
-    name = "/index.vnc";
-  if (strcmp(name, "/VncViewer.jar") == 0)
-    name = "VncViewer.jar";
-  if (strcmp(name, "/index.vnc") == 0)
-    name = "index.vnc";
-
-  HRSRC resource = FindResource(0, TStr(name), _T("HTTPFILE"));
-  if (!resource) return 0;
-  HGLOBAL handle = LoadResource(0, resource);
-  if (!handle) return 0;
-  void* buf = LockResource(handle);
-  int len = SizeofResource(0, resource);
-
-  rdr::InStream* is = new rdr::MemInStream(buf, len);
-  if (strlen(name) > 4 && strcasecmp(&name[strlen(name)-4], ".vnc") == 0) {
-    is = new rdr::SubstitutingInStream(is, this, 20);
-    *contentType = "text/html";
-  }
-  return is;
-}
-
-char* JavaViewerServer::substitute(const char* varName)
-{
-  if (strcmp(varName, "$$") == 0) {
-    return rfb::strDup("$");
-  }
-  if (strcmp(varName, "$PORT") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", rfbPort);
-    return str;
-  }
-  if (strcmp(varName, "$WIDTH") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", server->getDesktopSize().x);
-    return str;
-  }
-  if (strcmp(varName, "$HEIGHT") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", server->getDesktopSize().y);
-    return str;
-  }
-  if (strcmp(varName, "$APPLETWIDTH") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", server->getDesktopSize().x);
-    return str;
-  }
-  if (strcmp(varName, "$APPLETHEIGHT") == 0) {
-    char* str = new char[10];
-    sprintf(str, "%d", server->getDesktopSize().y);
-    return str;
-  }
-  if (strcmp(varName, "$DESKTOP") == 0) {
-    return rfb::strDup(server->getName());
-  }
-  if (strcmp(varName, "$USER") == 0) {
-    char tempStr[256];  DWORD tempStrLen = 256;
-    GetUserName(tempStr, &tempStrLen);
-    return rfb::strDup(tempStr);
-  }
-  return 0;
-}
diff --git a/win/winvnc/JavaViewer.h b/win/winvnc/JavaViewer.h
deleted file mode 100644
index 79a3969..0000000
--- a/win/winvnc/JavaViewer.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * 
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- */
-
-// -=- JavaViewer.h
-
-// Custom HTTPServer-derived class which serves the Java VNC Viewer
-// to clients, using resource files compiled in to the WinVNC executable.
-
-#ifndef WINVNC_JAVA_VIEWER
-#define WINVNC_JAVA_VIEWER
-
-#include <rfb/HTTPServer.h>
-#include <rdr/SubstitutingInStream.h>
-
-namespace winvnc {
-
-  class VNCServerWin32;
-
-  class JavaViewerServer : public rfb::HTTPServer, public rdr::Substitutor {
-  public:
-    JavaViewerServer(VNCServerWin32* desktop);
-    virtual ~JavaViewerServer();
-
-    virtual rdr::InStream* getFile(const char* name, const char** contentType,
-                                   int* contentLength, time_t* lastModified);
-
-    // rdr::Substitutor callback
-    virtual char* substitute(const char* varName);
-
-    void setRFBport(int port) {
-      rfbPort = port;
-    }
-  protected:
-    int rfbPort;
-    VNCServerWin32* server;
-  };
-
-};
-
-#endif
-
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx
index b164c65..9f6a954 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -42,8 +42,6 @@
 const TCHAR* winvnc::VNCServerWin32::RegConfigPath = _T("Software\\TigerVNC\\WinVNC4");
 
 
-static IntParameter http_port("HTTPPortNumber",
-  "TCP/IP port on which the server will serve the Java applet VNC Viewer ", 5800);
 static IntParameter port_number("PortNumber",
   "TCP/IP port on which the server will accept connections", 5900);
 static StringParameter hosts("Hosts",
@@ -63,8 +61,7 @@
       CreateEvent(0, FALSE, FALSE, "Global\\SessionEventTigerVNC") : 0),
     vncServer(CStr(ComputerName().buf), &desktop),
     thread_id(-1), runServer(false), isDesktopStarted(false),
-    httpServer(this), config(&sockMgr),
-    rfbSock(&sockMgr), httpSock(&sockMgr), trayIcon(0),
+    config(&sockMgr), rfbSock(&sockMgr), trayIcon(0),
     queryConnectDialog(0)
 {
   commandLock = new os::Mutex;
@@ -148,16 +145,10 @@
   // -=- Make sure we're listening on the right ports.
   rfbSock.setServer(&vncServer);
   rfbSock.setPort(port_number, localHost);
-  httpSock.setServer(&httpServer);
-  httpSock.setPort(http_port, localHost);
-
-  // -=- Update the Java viewer's web page port number.
-  httpServer.setRFBport(rfbSock.isListening() ? port_number : 0);
 
   // -=- Update the TCP address filter for both ports, if open.
   CharArray pattern(hosts.getData());
   rfbSock.setFilter(pattern.buf);
-  httpSock.setFilter(pattern.buf);
 
   // -=- Update the tray icon tooltip text with IP addresses
   processAddressChange();
diff --git a/win/winvnc/VNCServerWin32.h b/win/winvnc/VNCServerWin32.h
index ed051dc..271cb76 100644
--- a/win/winvnc/VNCServerWin32.h
+++ b/win/winvnc/VNCServerWin32.h
@@ -27,7 +27,6 @@
 #include <rfb_win32/SocketManager.h>
 #include <rfb_win32/TCharArray.h>
 #include <winvnc/QueryConnectDialog.h>
-#include <winvnc/JavaViewer.h>
 #include <winvnc/ManagedListener.h>
 
 namespace os {
@@ -78,10 +77,6 @@
 
     bool setClientsStatus(rfb::ListConnInfo* LCInfo);
 
-    // Used by JavaViewerServer
-    const char* getName() {return vncServer.getName();}
-    rfb::Point getDesktopSize() {return desktop.getFbSize();}
-
   protected:
     // VNCServerST::QueryConnectionHandler interface
     // Callback used to prompt user to accept or reject a connection.
@@ -121,12 +116,10 @@
     DWORD thread_id;
     bool runServer;
     bool isDesktopStarted;
-    JavaViewerServer httpServer;
     rfb::win32::SocketManager sockMgr;
     rfb::win32::RegConfig config;
 
     ManagedListener rfbSock;
-    ManagedListener httpSock;
     STrayIconThread* trayIcon;
 
     QueryConnectDialog* queryConnectDialog;
diff --git a/win/winvnc/index.vnc b/win/winvnc/index.vnc
deleted file mode 100644
index 560fa2e..0000000
--- a/win/winvnc/index.vnc
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- 
-     index.vnc - default HTML page for TigerVNC Java viewer applet, to be
-     used with WinVNC. On any file ending in .vnc, the HTTP server embedded in
-     WinVNC will substitute the following variables when preceded by a dollar:
-     USER, DESKTOP, APPLETWIDTH, APPLETHEIGHT, WIDTH, HEIGHT, PORT,
-     Use two dollar signs ($$) to get a dollar sign in the generated
-     HTML page.
--->
-
-<HTML>
-<TITLE>
-$USER's $DESKTOP desktop
-</TITLE>
-<APPLET CODE=com.tigervnc.vncviewer.VncViewer ARCHIVE=VncViewer.jar
-        WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT>
-<param name=PORT value=$PORT>
-<param name="Embed" value="true">
-<param name="draggable" value="true">
-</APPLET>
-<BR>
-<A href="http://www.tigervnc.org/">TigerVNC site</A>
-</HTML>
diff --git a/win/winvnc/resource.h b/win/winvnc/resource.h
index 68316be..0e52368 100644
--- a/win/winvnc/resource.h
+++ b/win/winvnc/resource.h
@@ -8,7 +8,6 @@
 #define IDD_DIALOG1                     103
 #define IDD_ABOUT                       104
 #define IDI_CONNECTED                   105
-#define IDR_VNCVIEWER_JAR               106
 #define IDD_QUERY_CONNECT               107
 #define IDD_ADD_NEW_CLIENT              108
 #define IDB_BITMAP                      109
diff --git a/win/winvnc/winvnc.rc.in b/win/winvnc/winvnc.rc
similarity index 96%
rename from win/winvnc/winvnc.rc.in
rename to win/winvnc/winvnc.rc
index 2b50966..44cb71c 100644
--- a/win/winvnc/winvnc.rc.in
+++ b/win/winvnc/winvnc.rc
@@ -217,18 +217,6 @@
 
 /////////////////////////////////////////////////////////////////////////////
 //
-// HTTPFILE
-//
-
-#cmakedefine BUILD_JAVA
-
-#ifdef BUILD_JAVA
-VNCVIEWER.JAR          HTTPFILE DISCARDABLE    "@VNCVIEWER_JAR_PATH@"
-INDEX.VNC              HTTPFILE DISCARDABLE    "@INDEX_VNC_PATH@"
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-//
 // 24
 //
 
