Here a few common things you may encounter when you attempt to compile parts of the HTTPClient.
You need to compile the classes using JDK 1.1 or later; the classes will not compile under JDK 1.0.2.
These can be safely ignored. The two places where deprecated API's are used are:
Cookie.java: the constructor '
new Date(...)' is used because I need a flexible date parser to handle all the (broken) date formats used out there. Note that java.text.SimpleDateFormat doesn't even begin to cut it because it's far too restrictive, and I don't feel like writing my own parser (i.e. subclass of java.text.DateFormat) right now.
System.runFinalizersOnExit(...)' is deprecated as of JDK 1.2. However, I need it to save the cookies at exit time. JDK 1.3 has a better solution, but until everybody has switched to that I'm stuck.
As with using the HTTPClient, all the sources must be in a directory called HTTPClient and the CLASSPATH must point to the directory which contains the HTTPClient directory (i.e. it must point to one level above the sources).
.../HTTPClient/XXX.java: Class HTTPClient/XXX already defined in .../HTTPClient/XXX.java
This happens in some versions of JDK 1.1.x and is a bug in the compiler. Either use a different version of JDK 1.1, to JDK 1.2, or create a separate source directory, move the sources into there, and compile the classes into the actual HTTPClient directory (using the -d <directory> option to javac).
A makefile is provided. However, it's set up for my Linux environment, so you'll need to tweak the definitions at the beginning appropriately. If you're using M$ then you'll probably need to change a number of things; however, the dependencies should be ok.