Hello, please move this to the Technical Issues sub-forums and ye may receive help in there. (promise me ye won't leave a shadow copy in here)
EDIT: Please restart Steam if ye are using Steam to play Spiral Knights.
I can't guarantee this would be yer connectivity issue, as if it was, the error message will show about server outage or connectivity problem. But "Failed to connect to server" might be some problems with java(confirmation needed from tech experts), or somewhat.
Ye should check yer connection first, I can't really tell if it was but let's do it to confirm that it is the problem, 'mkay?
If ye could do one thing for me, open up yer Command Prompt and type:
ping www.google.com -t
Leave the Command Prompt off at the background and start playing Spiral Knights. When ye received the error message "You were disconnected from the server", check back to yer command prompt and press CTRL+V and scroll up and see if there was any general failures or unreachable destination hosts. Do also check yer ping if it has went up recently.
Last but not at least, if it is yer connection issue, please tell us which kind of router are ye using.
I hope anything would help for connection issues now, if the issue is about java etc. , I will leave to those who can help with this (I'm no computer expert but this may be the steps to identify issues, just to let ye know, I don't study IT. fufufu)