Old Javanese, often called Kawi, the language of poets, is the literary language of Hindu and Buddhist Java. It appears in inscriptions from the early ninth century and matured into one of Asia's great court literatures, saturated with Sanskrit learning yet fully Javanese in structure. Nearly half its recorded vocabulary is Sanskrit borrowed, and its poets worked Sanskrit metres into the kakawin, the long court poem. The oldest surviving major work, the Kakawin Ramayana, from around the ninth to tenth century, retells the Ramayana with a sophistication that made it the model for a millennium.
The courts of Kediri, Singhasari and Majapahit produced the classics that followed, the Arjunawiwaha of Mpu Kanwa, the Bharatayuddha on the great Mahabharata war, the Sutasoma of Mpu Tantular, a Buddhist epic from which Indonesia later took its national motto, unity in diversity, and prose renderings of the Indian epics and puranas. Composition was itself a religious act. Kakawin poets open with a manggala invoking the deity of beauty into the poem, treating the finished work as a temple of language in which the god may dwell, an aesthetic theology that scholars of Java have called the religion of beauty.