In just 40 years, Japan had established itself as a viable world power.
Japan established itself as a world power in 40 years.
(The virtual machine is the program that interprets or, in some cases, compiles and runs the compact Java bytecodes that make up a Java program.)