As far as I understand it is possible (and legal) to enter the US on a J1 visa, marry a US citizen and then apply for adjustment of status. My concern however, is how suspect this would look to the USCIS.
I obtain a J1 that is valid for 4 or 5 months for a trainee position, that is NOT subject to the 2-year home country rule. 3 months after entering the US (when I have let's say 2 month left on my visa) I marry my american fiancée who is a US citizen. Then I would in theory be able to apply for adjustment of status. If I've got it right, the only "illegal" thing about this situation would be to enter the US with a J1 with the intention of getting married, since there are other kinds of visas for this purpose (K1). The problem is to make sure that noone finds out about this intention.
If someone has a J1 that is valid for let's say 4 years, it's much easier to claim that the marriage wasn't planned and it basically "just happened", since the marriage can take place much later after entering the US, than in my example above. Would the USCIS suspect that a marriage that takes place only 3 months later actually was planned long before I entered the US, and therefore is an illegal act? It's apparently recommended to wait at least 2 months before getting married to not raise any suspicions, but would that be enough? If they start to ask questions and start to investigate why the marriage took place that soon, they would probably look at the wedding pictures and realize that in reality, it took way longer than just 2 or 3 months to plan. Is there any good way of doing this? The other option would be a K1, but I'd prefer not to wait for another 6 months to get the K1.