Question about importCommands()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Question about importCommands()

Gary M
I am using BeanShell 1.3.0. I have a jar file containing, amongst other things, a bsh command. In reading the the manual I expected that if importCommand("com.mycommands") and the jar was in the classpath, it would work; however, after much playing around I can only get it work by adding the jar file to the classpath, THEN importing the commands.


I can confirm the jar is in the classpath, by virtue of the fact I can import Java classes from said.

I would rather not hardcode this path, because the code I am developing will be shared over multiple systems in an EAR file and, thus, the path to the jar is not really predictable.

I was wondering if I was doing something wrong, or if there is an alternative to the above?

Thanks for any help.


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Beanshell-users mailing list
[hidden email]