[EclipseShell-developer] Re: [Beanshell-users] EclipseShell: script Beanshell from Eclipse
Status: Abandoned
Brought to you by:
murphee
From: Werner S. (murphee) <wer...@ne...> - 2006-03-14 23:04:59
|
Krau=DF wrote: > I just set up a separate project to run another test (see attachment).=20 > Exlipcitely selected the project node before starting up the shell and = simply evaluated the following commands in a region: > test=3Dnew com.gft.test.beanshell.HelloWorld(); > test.setMyText("huhu"); > This time, I had a short glance at the error log as well. =20 BTW: for the external launch: it's good to evaluate "1+1" or something=20 like that first, to start the remote JVM. This takes a bit (a couple of=20 seconds), so just executing something simple is best; after the console=20 for the new JVM process has appeared (it should have a red stop=20 button, like all other Java Consoles) see if the connection is up, do=20 something like print("Hello"); to see if it works. > Using the 'external' run mode yields an rmi exception (see first two en= tries in the logfile). Yes, that should be about right, but they shouldn't be problems (I just=20 log them for completeness). The first one comes from the fact that I=20 want to execute something, but the newly launched JVM (with Beanshell)=20 hasn't managed to start the RMI server yet. With the 2nd one, it tries to send a Beanshell Callstack over the wire,=20 which isn't possible; Did an Exception or an error occur in the=20 Beanshell JVM? >It worked at least once (in a previous session) and I was able to issue = a 'javap(test)' with the correct output,=20 >but I can't reproduce it. I even rebooted the computer just to be on=20 the safe side, but couldn't get it working once more. Strange... What happens now if you launch the external mode? > For the eclipse mode, I get an entry in the error log referring to my w= orkspace location.=20 But besides the error, is it possible to evaluate code? > The problem is probably because of the use of the result of "path.toOSS= tring();" in the InProcessBeanshellProvider.=20 > Seems like the windows separator characters are interpreted as escape=20 charaters in the course of the evaluation of the 'cd' command. >Maybe=20 you can get around this issue by setting the variable 'bsh.cwd' directly. Thanks for the tip! The fact that the backslashes on windows cause=20 troubles, when the Beanshell interpreter sees them in Strings is really=20 a nasty little bug. I now set the bsh.cwd directory, and later on still=20 try the Beanshell cd(); Thanks for your bug reports, they're very helpful. Sorry if some things=20 don't work quite right yet, but with reports like these, I can try=20 fixing them. murphee --=20 Blog @ http://jroller.com/page/murphee EclipseShell @ http://eclipse-shell.sourceforge.net/ |