"maybe your java needs an update."
would an java update help?
"And a truck load of client.print() statements eating your SRAM."
I used this method to check if it cant handle the long string, but if i do it like this its uploading, if i do it in one long string, it doesnt upload and give me the error i posted above.
Each of the character literals in the client.print() statements is moved into SRAM before your code starts running. I haven't counted the number of characters, but you only have 2KB of SRAM, and those strings are eating a lot of it.
So would char fix it? or is there any other method to load such a big html file?, maybe switch to sdcard load the html file and then switch to the wiznet chip?
The answer is to keep things in flash, and find a way to stop them being copied into SRAM. If you are using IDE 1.0, then there is an easy way to do that, with the F() macro. This
I tried the code on 1.0 and 0.22 (win7/64) both failed with the exception you got, so bug confirmed. The auto formatting crashes too. There is probably a buffer overrun intern in the IDE that cannot hold strings that are too long.
The cause is two long strings. (two not one). if these two strings are removed from the code the application compiles perfectly (not tried to run it) .
Solutions:
Split the strings up in shorter ones, that are client.print()-ed seperately .
You will still have problems with the restricted memory of the UNO ==> to be solved with progmem / F()
Write these strings (all html content) to an SDcard and read it when needed to send over the internet.
imho the better solution.
i will try the second one, but how do i deactivate the wiznet chip read the html file and then activate the wiznet and send it to the client?
i know how to read the html file, how to send it to the client, but how do i deactivate the chip and then activate it?