Pregunta

I can't run Grinder3 framework with Jython. I've downloaded it and I see that there are a lib/ folder with some .jar files.

The grinder3 provide some examples (written in python). I receiver an error when I try to run these example with jython, the error tells me that the lib cannot be found.

How should I include those jar to be able to run the examples?

Traceback (most recent call last):
  File "amazon.py", line 18, in <module>
    from net.grinder.script.Grinder import grinder
ImportError: No module named ne
¿Fue útil?

Solución

You need to include grinder lib dir to CLASSPATH on to your shell. Make sure your environment variable has path added. As a thumb rule make sure GRINDERPATH, GRINDERPROPERTIES, CLASSPATH & JAVA_HOME are set before you start Grinder

I would suggest you to create environment variable file (or even add to startup profile script) with the above mentioned data & add it to shell profile. This will ensure that your path are set correctly

set GRINDERPATH=<em>(full path to grinder installation directory)</em>
set GRINDERPROPERTIES=<em>(full path to grinder.properties)</em>\grinder.properties
set CLASSPATH=%GRINDERPATH%\lib\grinder.jar;%CLASSPATH%
set JAVA_HOME=<em>(full path to java installation directory)</em>
PATH=%JAVA_HOME%\bin;%PATH%

If the setting does not solve it for you, then an you print CLASSPATH using "echo" and verify the presence of your JAR file? Paste it here along with the command that you are using to launch Grinder

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top