Java is an object oriented programming language that is made to be cross platform. It runs on the Java virtual environment that allows it to compile and run on any machine. Java was originally developed by James Gosling at Sun Microsystems and the first implementation was released in 1996. Eventually Oracle bought out Sun Microsystems in 2009-2010 and took over the language.
When Java is compiled it gets translated to byte code which can then run on the Java Virtual Machine no matter the underlying system. Java was built on 5 principles,
Outdated versions of Java have some serious unresolved security issues, so anything that is not an LTS or current version may have vulnerabilities.