I am new using BeanShell. I am writing a driver and an graphic client for this driver so that I can install the driver on a computer connected directly to the device and the graphic client on other computer which should communicate with the driver over internet using Beanshell.
So when the client wants to know the state of the device it sends a string "isConnected()" to get the result of "device.isConnected()", the driver executes something like this:
Device device = new Device(); //Device is a class which contains a function "isConnected()"
Interpreter interpreter = new Interpreter();
But this returns an eval exception.
How can I load a variable into the interpreter and later execute its functions from Beanshell?
If I can do that, the variable will reflect its changes if it is changed from java?