Java is a platform independant, object-oriented programming language, which is mainly used to implement client- and server-side applications for the World-Wide-Web.
JavaScript is a HTML embedded scripting language for the implementation of client-side functional extensions to HTML documents. In some cases, this language is also used for server-side scripting as well.