Question about importCommands()
"Gary M" <[email protected]> Fri, 18 Jul 2008 12:53:20 -0400
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <[email protected]> |
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.
addClassPath("/path/to/my.jar");
importCommand("com.mycommands");
myCommand();
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.
--
Gary
-------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Beanshell-users mailing list
Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/beanshell-users