How to import/include external file with a custom class to an objectscript (Public Cloud) - Forum - Rollbase - Progress Community

How to import/include external file with a custom class to an objectscript (Public Cloud)

 Forum

How to import/include external file with a custom class to an objectscript (Public Cloud)

This question is not answered

I have uploaded this external file to hosted files.

How can I import/include this and use it in an Object-script?

All Replies
  • Hi,

    Please look into the following doc links and let me know if you have any particular questions

    documentation.progress.com/.../

    documentation.progress.com/.../

    Thanks and Regards,

    Chandu.

  • Yes but my hosted file looks like this:

    "

    package com.xxxautomation;

    import java.util.*;

    import javax.swing.*;

    public class LinearX123Encoder

    {

    static boolean isDemo = false;

       protected boolean isDigit(char n)

       {

           if ((char)n >=48 && (char)n <=57)

               return true;

           else

               return false;

       }

    ........

    "

    I would like to use this class in an objectscript like this.

    try {

       LinearX123Encoder xEncoder = new LinearX123Encoder();

       var encodedstring=xEncoder.Codex("");

       rbv_api.println("encodedstring");

        }

    But where and how can i include the external file or reference it?

    Can I use a path/reference to the hosted file in this line:

    "LinearX123Encoder xEncoder = new LinearX123Encoder();"

    Can you give me an example?