Re: java.lang.InstantiationException

[email protected]
Newsgroups gmane.comp.java.robocode
Message-ID <[email protected]>
Dear Flemming,

I make a code below

public class harueRobot extends AdvancedRobot {
    public harueRobot() {}
    public void run () {
        while (true) {
        }
    }
}

And after compiling a code, I try to battle robot in robocode tool

And it generate error below

Round 1 initializing..
Let the games begin!
java.lang.InstantiationException: yongjin2712choi.harueRobot
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:325)
at 
net.sf.robocode.host.security.RobotClassLoader.createRobotInstance(RobotClassLoader.java:256)
at 
net.sf.robocode.host.proxies.HostingRobotProxy.loadRobotRound(HostingRobotProxy.java:171)
at 
net.sf.robocode.host.proxies.HostingRobotProxy.run(HostingRobotProxy.java:210)
at net.sf.robocode.host.proxies.BasicRobotProxy.run(BasicRobotProxy.java:44)
at java.lang.Thread.run(Thread.java:722)

.yongjin2712choi.harueRobot could not be started or loaded. This robot has 
been banned and will not be allowed to participate in battles.

Waiting for robot yongjin2712choi.harueRobot to stop thread TimerQueue
Robot yongjin2712choi.harueRobot is not stopping.  Forcing a stop.

I don't know a reason.

Do you know why does it generate error?

2014년 10월 27일 월요일 오전 6시 17분 33초 UTC+9, fnl 님의 말:
>
> Hi, :-)
> Can you tell me how to reproduce the problem?
> You mention "test robot". Which robot is it that causes the issue?
>
> Robocode should work on both Java 7 (1.7) and Java 8. Are you using 
> OpenJDK or Oracle JDK?
>
> Which system are you running on?
>
> Cheers,
> - Flemming
>
>
> Den fredag den 24. oktober 2014 07.05.21 UTC+2 skrev [email protected]:
>>
>> Hello,
>>  
>>    I had tried to execute test robot after Eclipse project with example 
>> code included in robocode-1.9.2.3-setup.jar
>>    But when executed, it generate error with 
>> java.lang.InstantiationException.
>>    I use 1.7 java version and I am java beginner.
>>  
>>    Please tell me solution if you know....
>>  
>>    
>>
>

-- 
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.