IBM Worklight v5.0.5 > Develop IBM Worklight applications > Develop the server side of an IBM Worklight applicationCall 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.
- Instantiate a Java object using the new keyword and apply the method on the newly instantiated object.
- Optional: Assign a JavaScript variable to be used as a reference to the newly instantiated object.
- 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...
var x = new MyJavaClass();
var y = x.myMethod(1, "a");
Parent Develop the server side of an IBM Worklight application