Allocate java_class on stack in main().
Change more types to stdint.