Java is a fully fledged programming language developed by Sun microsystems to create platform independent code. Java can run on any computer which can run JRE (Java Runtime Environment) , either as stand alone code or embedded in a webpage. The use of a run time compiler allows the creation of a single source code to run on multiple platforms. Therefore reducing code duplication.
Javascript is an embedded script language originally designed by Netscape to provide advanced functionality for its browser and although advanced API's can be used to enhance the functionality of Javascript generally it is used to create multimedia on webpages.