jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raza, Rizwan \(MLCI\)" <Rizwan_R...@ml.com>
Subject evaluating simple string "2 == 2"
Date Tue, 14 Oct 2008 22:45:22 GMT
Hi folks:

 

How can I evaluate the string "2 == 2" in a java program. Is it
possible?

 

I did the following but it is throwing ClassNotFound exception

 

BSFManager manager = new org.apache.bsf.BSFManager();

Object o = manager.eval("","",0,0,"2==2");

return o.toString();

 

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory

      at org.apache.bsf.BSFManager.<init>(BSFManager.java:102)

      at EvaluatorB.Evaluate(EvaluatorB.java:13)

      at Evaluator.main(Evaluator.java:8)

Caused by: java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory

      at java.net.URLClassLoader$1.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(Unknown Source)

      at java.lang.ClassLoader.loadClass(Unknown Source)

      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

      at java.lang.ClassLoader.loadClass(Unknown Source)

      at java.lang.ClassLoader.loadClassInternal(Unknown Source)

      ... 3 more

 

I think I am missing some configuration file. Can someone please point
me to the right direction?

 

Thanks
--------------------------------------------------------

This message w/attachments (message) may be privileged, confidential or proprietary, and if
you are not an intended recipient, please notify the sender, do not use or share it and delete
it. Unless specifically indicated, this message is not an offer to sell or a solicitation
of any investment products or other financial product or service, an official confirmation
of any transaction, or an official statement of Merrill Lynch. Subject to applicable law,
Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems.
The laws of the country of each sender/recipient may impact the handling of EC, and EC may
be archived, supervised and produced in countries other than the country in which you are
located. This message cannot be guaranteed to be secure or error-free. This message is subject
to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging
with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message