@taba do you still need help?
Please look at your W-2 because I suspect that your employer would have adjusted the line 1, line 3 and line 5 for the situation-- as long as they were aware of the treaty situation ( form your post they appear to have been ).
If that is not true then you do have to prepare a form 8833 and therefore use file-by-mail. You can prepare the return based on adjusted return i.e excluding the J-1 period income and attach a copy of the W-2 and 8833.