Converted beanshell interpreter doesn't evaluate expression properly. #361
Unanswered
apn-hroussel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
OK, so I wrote a simple Java program that makes use of the beanshell (bsh) interpreter. Here's the code,
When running under Java, the result is "false" as expected.
But when I run the converted runnable jar (with ikvmc), I get "true" as the result.
Note that the "true" result is with an old version of the bsh jar, bsh-2.0b5. Going to bsh-2.0b6 or even the most recent, bsh-2.1.1, the result is a call stack,
Exception in thread "Thread-0" cli.System.MissingMethodException: Method not found: '?'.
at java.lang.reflect.Method.invoke(Method.java:486)
at bsh.Reflect.invokeMethod(Reflect.java:127)
at bsh.Reflect.invokeObjectMethod(Reflect.java:77)
at bsh.Name.invokeMethod(Name.java:852)
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:69)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:96)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:41)
at bsh.Interpreter.eval(Interpreter.java:667)
at bsh.Interpreter.eval(Interpreter.java:750)
at bsh.Interpreter.eval(Interpreter.java:739)
at com.alphinat.test.Main.main(Main.java:20)
at java.lang.reflect.Method.invoke(Method.java:486)
at IKVM.Java.Externs.ikvm.runtime.Launcher.run(Unknown Source)
Note that when converting the runnable jar, for either of the 3 version of the bsh jar, I got two warnings,
warning IKVMC0100: Class "org.apache.bsf.util.BSFEngineImpl" not found
warning IKVMC0100: Class "javax.servlet.http.HttpServlet" not found
Not sure how critical they are to the error I'm observing. I tried adding the Apache bsf jar to by runnable jar, but still same error.
Any suggestions as to what the issue might be?
Beta Was this translation helpful? Give feedback.
All reactions