Re: importCommands Question
David <[email protected]> Wed, 07 Apr 2010 11:57:55 -0400
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <[email protected]> |
You dont import the individual .bsh file you import the entire directory.
Look again at the link you referenced:
http://www.beanshell.org/manual/commands.html
The example is :
addClassPath("/home/pat"); // If it's not already in our classpath
importCommands("/mycommands");
So in your case it would be
addClassPath("C:\\JMeter\\jakarta-jmeter-2.3.4\\lib");
importCommands("C:\\JMeter\\jakarta-jmeter-2.3.4\\lib");
-------------------------
David A. Lee
[email protected]
http://www.calldei.com
http://www.xmlsh.org
On 4/7/2010 11:50 AM, Steve Eckhart wrote:
> I am attempting to follow the examples in the BeanShell User's Manual. I cannot get the example for Adding BeanShell Commands to work. Here's what I've tried:
>
> 1. Created a file helloWorld.bsh with the helloWorld() command shown in the User's Manual (http://www.beanshell.org/manual/commands.html).
>
> 2. Saved the file in my directory C:\JMeter\jakarta-jmeter-2.3.4\lib.
>
> 3. Executed the commands:
>
> a. addClassPath("C:\\JMeter\\jakarta-jmeter-2.3.4\\lib");
>
> b. importCommands("helloWorld.bsh");
>
> c. helloWorld();
> This generates an error:
> // Error: EvalError: Command not found: helloWorld() : at Line: 1 : in file:<unknown file> : helloWorld ( )
>
> I've also tried executing importCommands with the full path to helloWorld.bsh.
>
> What am I doing wrong? Thanks,
>
> Steve Eckhart
> Business Analyst/Project Manager
>
> WAUSAU Financial Systems
> 14010 FNB PKWY STE500
> Omaha, NE 68154-5206
> Main: (402) 431-8810
> Direct line: (402) 715-9382
> Cellular: (402) 510-5387
> Email: steve.eckhart-7kxDKHIo/91Wk0Htik3J/[email protected]<blocked::mailto:steve.eckhart-7kxDKHIo/91Wk0Htik3J/[email protected]>
>
> Enterprise Payment Solutions.
> CONFIDENTIALITY NOTICE: This electronic transmission (including files attached hereto) is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any disclosure, dissemination, copying, distribution or taking of any action in reliance on the contents of this confidential information is strictly prohibited. If you have received this communication in error, please destroy it and immediately notify us by return email. Thank you.
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Beanshell-users mailing list
> Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev