Re: How can an external application disable the security manager?
Pavel Šavara <[email protected]>
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <CABB+073EQ4U3gSBmijMDR4M7NC5G4c1++Mpc17T0HYdUiA1Vcg@mail.gmail.com> |
System.setProperty("NOSECURITY", "true")
On Thu, Mar 1, 2012 at 2:25 PM, mbesney <[email protected]> wrote:
> **
>
>
> Hello,
>
> Could someone please advise me on this?
>
> I am using the robocode.control class to run Robocode from an external
> Java application. The external application is also using the
> java.awt.datatransfer class to place a string in the system clipboard as
> soon as a battle starts. I have an interactive robot that uses the
> java.awt.datatransfer class to read the string from the clipboard and
> display it in the robot console when the battle starts.
>
> When I run the external application it places the string in the clipboard
> but the interactive robot is immediately banned from the battle due to its
> accessing the clipboard (i.e. security is on). So after this I run Robocode
> from the console with the security off (-DNOSECURITY=true) and the
> interactive robot reads the clipboard and displays the message.
>
> So I know that external communication is possible, I just need to be able
> to turn off the security manager externally which none of the
> RobocodeEngine constructors seem capable of doing. I would really rather
> not modify the Robocode source code as I am a Robocode, Java, and open
> source rookie. If that's my only option, however, then I would go for it if
> I knew what files to change.
>
> Any suggestions would be much appreciated,
> Thank you,
> Regards,
>
> Mike
>
>
>