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

test = new WholeNumberPart( "22323332" );


On 10/16/07, Redefined Horizons <> 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.


Scott Huey

This 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 >>
Beanshell-users mailing list

-- << Java port site