Re: importCommands Question

Alexey Zinger <inline_four-/[email protected]> Wed, 7 Apr 2010 09:09:57 -0700 (PDT)
Newsgroups gmane.comp.java.beanshell.user
Message-ID <[email protected]>
If you look at the documentation in your link, the argument for importComma=
nds command is the "package" of your command.  In your case, it should be "=
/":

addClassPath("C:\\JMeter\\jakarta-jmeter-2.3.4\\lib");
importCommands("/");

 Alexey
2001 Honda CBR600F4i (CCS)
2002 Suzuki Bandit 1200S
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net





________________________________
From: Steve Eckhart <Steve.Eckhart-7kxDKHIo/91Wk0Htik3J/[email protected]>
To: "beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" <[email protected]=
rge.net>
Sent: Wed, April 7, 2010 11:50:30 AM
Subject: [Beanshell-users] importCommands Question

I am attempting to follow the examples in the BeanShell User's Manual. I ca=
nnot get the example for Adding BeanShell Commands to work. Here's what I'v=
e 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.b=
sh.

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/93QFizaE/[email protected]=
m>

Enterprise Payment Solutions.
CONFIDENTIALITY NOTICE:  This electronic transmission (including files atta=
ched 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 a=
re hereby notified that any disclosure, dissemination, copying, distributio=
n or taking of any action in reliance on the contents of this confidential =
information is strictly prohibited.  If you have received this communicatio=
n in error, please destroy it and immediately notify us by return email.  T=
hank you.
---------------------------------------------------------------------------=
---
Download Intel=AE 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&#174; 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