The java error's indicate an error in the IDE, maybe your java needs an update.
On what board are you running this code?
finally I see ...String ... in the code and I know this class is not the most memory efficient.
and the line starting with
client.println(" ....
is only runnable on a MEGA I assume.