JavaScript and java are unrelated.
Java is what is used to run flash which gives you browser games, videos etc.
JavaScript is a much lower level programing language (java is pretty-much a program) which is used to run some types of pages which use it.