Nov 23

Using 3rd party jar files

You can import external JAR files and use them in your apps, just like how you would use a Java Service written in your app. Following are the steps to incorporate an external jar file:

  1. From Developer Utilities, access File Explorer
  2. Import Resource, and select the Lib folder to place the jar file to be imported. As an example, we are using a mail file.
  3. Add the import statements for the required classes in your Java Service file. In this example, we have used the mail.jar, the package details of which can be found at https://javamail.java.net/nonav/docs/api/. To use this jar file to send emails we will be using the following code in the Java Service file after adding the import statements for the required class files:


  4. To invoke the Java Service create a new Variable for Java Service:
  5. The input parameters can be accessed from the Data tab and can be bound or set to static values
  6. The Java Service can be executed either
    • by setting the Update data on input change to true thus triggering whenever the input values change or
    • by triggering the Variable created for any event on a widget for example on Mouse Click event of a Button.
  7. The result from the execution of this service can be bound to any widget.

5. Creating Backend Services

 
We use cookies to provide you with a better experience. By using our website you agree to the use of cookies as described in our Privacy Policy.