• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Using JVM for JavaScript

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

The JVM is capable of running multiple languages including Java Script. I am confused , what could be the possible cases in which one would use the Java script to be executed on the JVM.
Please explain.

Thanks in advance.


 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do with it whatever you want to do with it. For example, you can integrate a scripting engine into your own application to make it possible for users to automate things in your application.

Last year I worked on a project where we wrote a piece of software that does price calculations (batch processing: it reads transactions from a file, and then calculates the price of each, according to business rules). We needed to have a way to be able to change things in the business rules easily, without needing to create a new version of the application each time a business rule changes. So we added the possibility to implement business rules in JavaScript; our application uses the JVM scripting engine to execute those scripts.

JavaScript is also sometimes used on the server side in web applications (have a look at Node.js, for example, which allows you to build webapps in JavaScript - although Node.js does not run on the JVM).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic