Um I am not 100% sure but should it not read

test = new WholeNumberPart( "22323332" );

Regards
Travis


On 10/16/07, Redefined Horizons <redefined.horizons@gmail.com> wrote:
I recently bought the O'reilly book "Learning Java" and I have gotten
hooked on Beanshell as a result. (I've been programming in Java for a
couple of years.)

I tried to start using Beanshell with some of my own classes today,
but i've run into trouble. I was hoping I might get some suggestions
on how to correct my mistake.

I've got a Jar file with a class named WholeNumberPart. I add the Jar
file to my classpath in beanshell using the addClassPath command. I
then use the "import *" command.

The WholeNumberPart class defines a single constructor which accepts a
String as its only parameter. When I try to run the following line in
the Beanshell console:

test = WholeNumberPart( "22323332" );

I get this error message:

// Error: EvalError: Command not found: WholeNumberPart(
java.lang.String ) : at Line: 1 : in file: <unknown file> :
WholeNumberPart ( "2235226" )

It seems like Beanshell can't find my constructor. I'm not sure how to
fix this. (I know the constructor is defined in the class file, and I
get no compile erros.)

I must be missing something obvious.

Thanks,

Scott Huey

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Beanshell-users mailing list
Beanshell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/beanshell-users



--
www.toxicbunny.co.za << Java port site