I want to create and import a java custom library into RIDE.
Create the Java file based on the below link
(source for creation of test library : http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-test-libraries)
Here below is the java Library Code:
public class MyLibrary{
public static final String ROBOT_LIBRARY_SCOPE = "GLOBAL";
public static final String ROBOT_LIBRARY_VERSION = "1.0";
public static final String ROBOT_LIBRARY_DOC_FORMAT = "HTML";
private int counter = 0;
public void count() {
counter += 1;
System.out.println(counter);
}
public void clearCounter() {
counter = 0;
}
}
Created the JAR file and placed in the path
D:\Python27\Lib\site-packages
Installed the Jython and set the environment vairables, JYTHON_HOME=D:\jython2.7.0; JYTHONPATH = D:\jython2.7.0\bin
Open RIDE and attached the library with the keyword
Library MyLibrary
It displayed the text in red. (Meaning it is not a recognized library).
D:\Python27\Lib\site-packagesseams to be the CPython installation path, not Jython? Why do you put a JAR in it? - Laurent LAPORTE