JavaScript
JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow a client-side script to interact with the user and make dynamic pages.
JavaScript do not create stand-alone applications. JavaScript is implemented using JavaScript statements that are placed within the <script>... </script>.
Java
Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as a core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
Here are the differences: