Wrong!!
Use pub. 519 to determine if you are a resident or a non-resident.
http://www.irs.gov/pub/irs-pdf/p519.pdf
According to it, H1 is a resident. So you have to file 1040 for federal tax return.
F1(entered US as F1) is non-resident. Yes, 1040NR and treaty applies to you. ($5000 a year exempt)
J1, 3 years tax free.