Status: New
Owner: ----
New issue 1402 by
kenji.au...@gmail.com: Could not import Java keyword into
RIDE and get it into use
https://code.google.com/p/robotframework-ride/issues/detail?id=1402
I got the following error message while running my java keyword from RIDE:
Traceback (most recent call last):
File "", line 1, in
File "C:\jython2.7b4\Lib\runpy.py", line 170, in run_module
mod_name, loader, code, fname = _get_module_details(mod_name)
File "C:\jython2.7b4\Lib\runpy.py", line 104, in _get_module_details
if loader.is_package(mod_name):
AttributeError: 'ClasspathPyImporter' object has no attribute 'is_package'
My RF installation details
window 7 - 64bit
python-2.7.9
jython2.7b4
java 7 (jdk1.7.0_75)
latest RF and RIDE
My step details:
1. Create SampleKeywordLibrary.jar and store it at
C:\jython2.7b4\Lib\site-packages
here is the java code
package org.robot.sample.keywords;
public class SampleKeywordLibrary {
public static final String ROBOT_LIBRARY_SCOPE = "GLOBAL";
public static final String ROBOT_LIBRARY_VERSION = "1.0.2";
private int counter = 0;
public int count() {
counter += 1;
return counter;
}
public void clearCounter() {
counter = 0;
}
public void hello(String name) {
System.out.println("Hello, " + name + "!");
}
}
2. Set Classpath= C:\jython2.7b4\Lib\site-packages\SampleKeywordLibrary.jar
3. Open RIDE and Import SampleKeywordLibrary as below
*** Settings ***
Library SampleKeywordLibrary
*** Test Cases ***
test
hello world
4. From RIDE select execution profile=jybot and run
Could anyone please help me figure out what I went wrong. Thank you.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings