IllegalStateException using other libraries

View: New views
3 Messages — Rating Filter:   Alert me  

IllegalStateException using other libraries

by Rebecca-48 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm new to robocode, trying to use it for an art project of all
things. I've got the source downloaded and a project set up in
eclipse, as I want to interface with another project. Everything
compiles fine, I get both projects starting up when I try to run.
However, I want my robot to reference the outside project, and that's
where things are falling apart for me. The robot either doesn't load
(sits there saying "Disabled"), or it doesn't load and I get an
IllegalStateException -- it depends upon where I tried putting the
libraries (in the robots directory, or in the main project directory).
I'm not sure what else to try. Both projects are in Java, so I was
hoping to make use of that instead of having to resort to
reading/writing a file to communicate between projects. Any ideas?

Thanks,
Rebecca


Re: IllegalStateException using other libraries

by flemmingnlarsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rebecca,

It can be quite hard to tell exactly what is wrong without knowing the
exact configuration. However "Disabled" could mean that your robot(s)
get a SecurityException when you try to mix the two projects. That's a
common problem. You could try to add -DNOSECURITY=true right after the
-Dsun.io.useCanonCaches=false in the robocode.bat/sh file, or in your
"VM Arguments" under "Run Configurations.." in Eclipse. Normally these
are:

-Xmx512M -Dsun.io.useCanonCaches=false

You should set them to:

-Xmx512M -Dsun.io.useCanonCaches=false -DNOSECURITY=true

I am not sure if this will work, but at least that is worth a try.

Best regards,
- Flemming

--- In Robocode@..., "Rebecca" <beckster_rees@...> wrote:

>
> Hi all,
>
> I'm new to robocode, trying to use it for an art project of all
> things. I've got the source downloaded and a project set up in
> eclipse, as I want to interface with another project. Everything
> compiles fine, I get both projects starting up when I try to run.
> However, I want my robot to reference the outside project, and that's
> where things are falling apart for me. The robot either doesn't load
> (sits there saying "Disabled"), or it doesn't load and I get an
> IllegalStateException -- it depends upon where I tried putting the
> libraries (in the robots directory, or in the main project directory).
> I'm not sure what else to try. Both projects are in Java, so I was
> hoping to make use of that instead of having to resort to
> reading/writing a file to communicate between projects. Any ideas?
>
> Thanks,
> Rebecca
>



Re: IllegalStateException using other libraries

by Rebecca-48 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks so much! That is exactly what I needed. :) Now that you mention
it, I remember reading that somewhere in the documentation, I think,
but had forgotten it.

Thanks for your help,
Rebecca

--- In Robocode@..., "flemmingnlarsen"
<flemming.n.larsen@...> wrote:

>
> Hi Rebecca,
>
> It can be quite hard to tell exactly what is wrong without knowing the
> exact configuration. However "Disabled" could mean that your robot(s)
> get a SecurityException when you try to mix the two projects. That's a
> common problem. You could try to add -DNOSECURITY=true right after the
> -Dsun.io.useCanonCaches=false in the robocode.bat/sh file, or in your
> "VM Arguments" under "Run Configurations.." in Eclipse. Normally these
> are:
>
> -Xmx512M -Dsun.io.useCanonCaches=false
>
> You should set them to:
>
> -Xmx512M -Dsun.io.useCanonCaches=false -DNOSECURITY=true
>
> I am not sure if this will work, but at least that is worth a try.
>
> Best regards,
> - Flemming
>
> --- In Robocode@..., "Rebecca" <beckster_rees@> wrote:
> >
> > Hi all,
> >
> > I'm new to robocode, trying to use it for an art project of all
> > things. I've got the source downloaded and a project set up in
> > eclipse, as I want to interface with another project. Everything
> > compiles fine, I get both projects starting up when I try to run.
> > However, I want my robot to reference the outside project, and that's
> > where things are falling apart for me. The robot either doesn't load
> > (sits there saying "Disabled"), or it doesn't load and I get an
> > IllegalStateException -- it depends upon where I tried putting the
> > libraries (in the robots directory, or in the main project directory).
> > I'm not sure what else to try. Both projects are in Java, so I was
> > hoping to make use of that instead of having to resort to
> > reading/writing a file to communicate between projects. Any ideas?
> >
> > Thanks,
> > Rebecca
> >
>