Catalyst

by Zoho

Go to console

Frequently asked Questions

Browse through frequently asked questions and find quick solutions
to common queries and challenges on working with Catalyst

×

Working with Catalyst Functions using an External Editor

How do I access Catalyst Java functions in my Eclipse editor?

If you have created functions in the Catalyst remote console, you must download them to your local machine before you can access them in your editor. If you created functions on your local machine, you can skip to step 3.

To access Catalyst Java functions in your Eclipse editor:

  1. Download your function’s code from the remote console by executing the following Catalyst CLI command:

    $ catalyst pull

    You can refer to the Pull Resources help page for a detailed explanation.

    This will automatically create a functions directory in your project home containing your functions.

  2. Open your Eclipse editor. Navigate to File and then Open Projects From File System. catalyst_editor_q1_open_projects

  3. Click Directory next to Input Source in the pop-up. catalyst_editor_q1_directory

  4. Select the functions folder that was created using the CLI and click OK.

  5. Ensure that Add project to working sets is unchecked.

  6. Eclipse auto detects the Java functions in that folder. Select the functions you need from the list. catalyst_editor_q1_function_select

  7. Click Finish.

Your Catalyst functions are now accessible in Eclipse.

catalyst_editor_q1_eclipse_view

How can I include an external JAR in a Java function and bundle it along with the Catalyst Java functions?
  1. Open your Java functions in Eclipse as described in the previous answer.

  2. Right click on your project from the package explorer and click Build Path and then Configure Build Path… catalyst_editor_q2_configure_build_path

  3. Click the Libraries tab and select Add External JARs catalyst_editor_q2_jar_files

  4. Select the JAR to be included in the pop-up window and click Open.

  5. The selected JAR will be included in JARs and class folders on the build path. Click Apply and Close catalyst_editor_q2_apply

  6. Code your function with the JAR included and test the code by executing the following command from the CLI:

    catalyst serve

    You can learn about this command in detail from the Serve Resources help page.

  7. You can then directly deploy the function from the CLI without worrying about the additional JAR file. Execute the following CLI command to deploy the Java functions to the remote console along with the external JAR:

    catalyst deploy –only functions

    You can learn about this command in detail from the Deploy Resources help page.

  8. After the function has been deployed, you can verify whether the JAR has been added to your function group from the Catalyst console.