[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re-reading an edited class definition

Say I have a class, Foo, that I am working on and I am ready to test it using bsh. So I do something like:


Bsh % Foo f = new Foo();   // create an object

Bsh % f.test(); // test the function test


Now I find a problem in test() and recode it. In this case, I have not discovered how to get bsh to re-read in the new definition of Foo. What I have to do is exit and re-start bsh. Is there a way to re “source” class, and, if so, how? Actually, I see that there is a “source” built in function, but it doesn’t seem to have the hoped for function.




Chuck Irvine


PS: Being an old Lisp programmer, when I first heard of Java I had high hopes of being able to develop in it with access to a Lisp listener (Lisp interpreter), but I soon came to the conclusion that this didn’t exist. I think I even posted an article asking whether anything like this was planned and didn’t get the answer I wanted. Yesterday, I stumbled across BeanShell and I love it! Thanks!