IBM Worklight v5.0.5 > Develop IBM Worklight applications > Develop the server side of an IBM Worklight application

Call Java code from a JavaScript adapter


The name of any Java package referenced in an adapter must start with the domains: com, org, or net.

  1. Instantiate a Java object using the new keyword and apply the method on the newly instantiated object.

  2. Optional: Assign a JavaScript variable to be used as a reference to the newly instantiated object.

  3. Include the Java classes called from the JavaScript adapter in...

      Worklight Project Folder/server/java

    The IBM Worklight Studio automatically builds and deploys them to the WL server. The results are also placed in...

      Worklight Project Folder/bin

For example...


Parent Develop the server side of an IBM Worklight application





+

Search Tips   |   Advanced Search