Java was created in the 1990s by James Gosling and was designed to run on multiple devices through Java virtual machines. JavaScript was created in 1995 by Brendan Eich for web browsers and was renamed from Mocha to associate it with the popular Java. While Java focuses on write once run anywhere, JavaScript aimed to make the web more interactive. The two languages have some similarities like supporting object oriented programming and front-end and server-side development, but also have differences like Java having a simpler learning curve initially and JavaScript frameworks adding complexity.