Complex sentence: Jayavarman II (AD 802 to 850), lived as a prince at the court of Sailendra dynasty in Java (Indonesia), whether he lived there as a prisoner or for his education (or both) has not yet been established.
Split into simpler sentences: Jayavarman II (AD 802 to 850) lived as a prince at the court of Sailendra dynasty in Java (Indonesia). Whether he was there as a prisoner or for his education (or both) has not yet been established.