Java is a fully featured programming language. Using it will enable the creation of complete, standalone applications that run on a virtual machine or in a browser window (as long as the Java runtime environment is installed on the computer). Java code needs to be compiled to be run. JavaScript, in turn, is a scripting language, which is not meant to be compiled, but interpreted by a runtime environment in order to automate tasks. JavaScript can not be used to create a standalone application. Its code doesn't need to be compiled - it runs directly in a web browser.
Images from WordPress.com
Java and JavaScript are both currently used, but on different platforms. Java is the most used programming language on Android, as it is a native language for the platform. But in the past most mobile phones were capable of running Java applets, so most mobile games were developed using this language. As an example, you can take a look at the slot machines offered by Euro Palace Casino . The operator has mostly given up support for Java games nowadays, but back in the day all of its games were Java powered, running on the time's mobile phones.
But the same Euro Palace makes good use of Java Script on its browser interface. And not just its website - its games themselves, built using HTML5 for cross-platform compatibility, make use of the language for their functioning. Most HTML5 game engines rely on JavaScript, as it allows easy scripting and the use of a series of popular libraries. The Euro Palace mobile casino runs great on any mobile device, no matter what operating system it uses. Players can register an account easily, make a deposit and start playing wherever they are. And they should - the Euro Palace offers its players some of the most consistent wins and promotions of the industry.
Even with the success of Minecraft (written entirely in Java), the Java environment is not the one of choice for game developers for desktop computers. It is generally considered much better suited for business applications, thanks to its immense libraries, backwards compatibility and the support of Sun, the company behind it. JavaScript, in turn, is easy to master and use. Using it will assure quick deployment of products and games on all platforms, and the availability of so many open source libraries makes it a good choice for most games running in today's browsers.
Author
Phong Thai is a Web Developer, Web Coder for 20 years with PHP, JavaScript, CSS. He is the creator of JavaScriptBank.com - provide thousands of free JavaScript code examples, web development tips and tricks, helpful blogging guides.
Follow him on twitter@js_bank or connect with him on facebook@jsbank if you want. His websites for your knowledge: javascriptON.com , inOneSec.com , www.gomymobi.com