idea: Robocode for Python

Andrew Henshaw ahenshawatapowerdotcom
Sat Sep 15 04:34:49 CEST 2001


"Martin Franklin" <martin.franklin at westgeo.com> wrote in message
news:9ntldd$tie$1 at mail1.wg.waii.com...
>
>
>
> OK I give in I've just downloaded Robocode and installed/tested with
> straight Java works fine....  Now with Jython I got past the No Class Deaf
> error by putting jython.jar in the CLASSPATH in the robocode.sh script
>
> like so:-
>
> #!/bin/sh
> Java -cp robocode.jar:tools.jar:/usr/python/Jython/jython.jar:.
> robocode.Robocode
>
> But I cant get my pyrobot to do anything (It shows up but don't move!)
> and I get this message:-
>
> [bpse at m-franklin robocode]$ ./robocode.sh
> Preparing battle...
> Initialize building image: 400,300
> Scaling BattleView.
> Loading robots
> Initialize building image: 381,238
> Scaling BattleView.
> No, it is: |(java.util.PropertyPermission * read,write)|
> Preventing Robot Loader from access: (java.util.PropertyPermission *
> read,write)
> No, it is: |(java.util.PropertyPermission user.dir read)|
> Preventing Robot Loader from access: (java.util.PropertyPermission
user.dir
> read)
...snip...

This is a similar results to my efforts.  Interestingly, the permission
errors seemed to disappear upon reordering the classpath - no idea why.  But
then, my robot failed as my (your) pyrobot classs wasn't a subclass of
Robot.  Ooops, I wasn't linking in the robocode.jar.  When I changed that
back, I could no longer 'jythonc' my code.  Frustrating.  I'll try again
with a more controlled approach.  Good luck to you.










More information about the Python-list mailing list