commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject Re: Help with Javaflows ClassLoader
Date Sat, 10 Apr 2010 13:40:44 GMT
Hey Christian,

> I am in desperate need for a coroutine scripting solution for my game and I
> was so happy to find
> javaflow.
>
> Despite the simplicity of the tutorial, there seems to be a lot of
> complexity behind and I get errors
> I have no chance to deal with.

It does indeed hide quite something :)

> Here is what I tried:

On the first glance it looks reasonable.

> So nothing special here... The script is seemingly succesfully found and all
> the bytecode processing magic starts, but fails
> anywere in, and I have no chance to understand what goes wrong. Apparently
> the "loadClass" method fails and this is what i get:
...
> java.lang.IndexOutOfBoundsException: Trying to access an inexistant local
> variable 0

Interesting. And a little odd as the code is quite simple. I would
have thought this was already covered by the test cases. A testcase
(see VerificationTestCase) would be very much appreciated.

You could also try and pass the old BCEL rewriter to the constructor
of the classloader.

> So if anybody could help me I would really appreciate it. Besides I want to
> edit/load scripts while the main program is running. That?s why
> I chose the class-loader approch.

Well, if you want to script java. That's another thing. You then also
need to compile the source code. Either through JSR199 (now in java6)
or Commons JCI.

If you just want scripting and continuations you could also look into
rhino - which supports javascript continuations.

HTH
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message