[frakir@localhost robocode]$ java -jar robocode.jar java.lang.NoClassDefFoundError: robocode/security/RobocodeSecurityPolicy at java.lang.reflect.Method.invoke(Method.java:native) at kaffe.jar.ExecJarName.main(ExecJarName.java:70) at kaffe.jar.ExecJar.main(ExecJar.java:59)kaffe is old: Engine: Just-in-time v3 Version: 1.0.6 Java Version: 1.1 I thought 1.1 would run just fine.. any ideas? -- Frakir
You need at least Java 1.3 to run Robocode. Java 1.4.1 is suggested, since a lot of nano patternmatcher bots need at least 1.4 (see BrokenBots), and 1.4.2 has a bug in the security manager. -- Vuen
Download Blackdown Java2 from https://www.blackdown.org/ -- PEZ
Has anyone had any luck with Sun Java on Linux? I can't seem to get SittingDuck above about 10 fps in KDE on this fresh install, and I'm wondering if having grabbed the Sun VM 1.4.2_04 is to fault? -- Kuuran
@Vuen I have installed java 1.4.2_04 and had no problems with the security manager. what version of 1.4.2 had this bug. @Kuuran I have the same problem , and don't get higher fps than 30 either (using suse 8.0 and java 1.4.2_04) - maybe i should seach for a graphic chip driver --deathcon
I'm using the latest official driver from ATi for Linux. I haven't tested that it's being loaded properly, though, since I never game here. I guess I'll look into seeing what's /actually/ driving my graphics :P (edit) Yeah it was the stupid drivers. Disable all the kernel stuff that handles graphics (in my case this meant only Direct Rendering Manager (DRI) and the associated ATi driver) except agpgart and then grab your card's drivers, stick em in as a module, make, modules update, reboot, done. At least this helped with my Radeon, if you're running a non-ATi card your mileage may vary. Now this install absolutely flies, much faster than Java w/ XP on a comparable machine. -- Kuuran
i have linux on one machine and am trying to install on my computer with windows xp (ntfs). i'v got a copy of suse linux prof 9.0 that i borrowed and i want to install it along side my windows. with only one partition, i'v got to resize it with linux in order to make room for the other partition. to do this, i'v made 15 gigs free on my 30 gig harddrive and defragmented numerous times. but the suse partition resizer only will let me shrink the end of the partition, so if there are files sitting at the very end, i only have about 12 mb i can take off. it keeps telling me to run defragment in windows, and i keep doing it, but it's not helping. anyone have any suggestions? --andrew
help!
I have Sun's JVM on RedHat? 8.0, btw, and the RLL is run on Sun's JVM for RedHat? 9. I've only set up dual boot on a clean machine, so I haven't experienced andrew's problem before :-p -- Kawigi
andrew: Partition Magic is my guess... Linux has severe problems with handling ntfs partitions at all... --lRem
Question: Is there a (simpler than hacking the source to bits) way to prevent robocode from starting up swing when it's being used by another program? I want to run RR@H on a series of computers remotely without having to forward X packets from all of them. -- Kuuran
I think this might actually be a bug. And OpenSourceRobocode provides us with the power to fix it. I would like that bug removed too! -- PEZ
Hmm.. at least I'm not the only stuck one ;) I'm thinking it's more than likely a limitation of the API, because it doesn't let you specify whether or not you need the display portion. But I'm not totally sure, since I haven't really looked closely at it. I would definitely like to have the ability, though, bug or not. Also, I get the impression you (and several others on here) have been working with Linux longer than I, so any suggestions on a better workaround would be appreciated. -- Kuuran
The right answer should have been to run it in headless mode. The control API does let you tell it to not show the window, but Robocode still shows some window for a second I think, and it throws a HeadlessException? if you try to run it in headless mode (Jim would be able to tell you more here). I'd also like this to work, because it would make running the RobocodeLittleLeague easier for me, because it's being run remotely on a bunch of Linux boxes. This would allow me to remove Linux from my home computer because I'm not a student anymore, but I don't have any other good way to tunnel X over SSH in Windows :-p (we'll see how popular of a statement that is on this page). -- Kawigi
Hmm... I thought it just still loaded the window and didn't set it visible. But that pretty much amounts to the same. As for your problem of not being able to do this over windows, it is solvable, though I'm not sure how practically. Putty ssh client[1] supports X forwarding, all you need is a windows x server. As far as I know most of these are commercial (I believe this includes the one my University uses in it's labs), but there is Cygwin/X[2] which is probably worth trying out. No real prior experience to speak from, though. -- Kuuran
I use Cygwin and it includes lots and lots of good stuff. X Server, yes, and you can choose what wnidowing and desktoping flavours you like. Not only X but Cygwin also has ssh, sshd and virtually every unix command line tool you miss when you're on Windows; grep, find, awk, cut, vi... And then perl and apache and what-have-you. It's bloody like being on a unix box actually. I run the RR@H server from Cygwin. I also used to run this wiki on it a while. I'm running my [Halo 2 Wiki] from this PC now actually. This is temporary, waiting to get the time to set up a Linux server again. But Cygwin is so good it's not easy to motivate me to do that. =) It's freaking amazing how much you can get for free. I'm not sure this is related to Kawigi's problem with "tunneling X over SSH" so I should stop babbling.
Let me just add that I also run VNC on my PC's, Macs and Linux boxes and thus can reach the desktops of any computer from any other. If you start RR@H from such a session you can drop the connection and it'll still be running (since it's connected to the local X Server or Windows or Mac Aqua or whatever environment). Just tunnel VNC over ssh like so: ssh -L:5900:localhost:5900 user@remotehost.com
(remotehost.com is the ip or dns name of the computer you want to connect to, localhost is literaly that). Then start a VNC client and point it to localhost (or sometimes you need to use the ip address 127.0.0.1).
-- PEZ
To further deviate from the topic, and to find another reason to mention Microsoft products on the Linux page, I suppose I should mention to PEZ that I'm finally on X-Box Live, but I've only played Halo 2 on there a couple times so far. Look out for me (you can guess what my handle is ;-)). Unfortunately, I had to downgrade my home wireless network from WPA to WEP for compatibility with the X-Box wireless adapter, and now my Lappy doesn't seem to be able to use it anymore (anyone with experience getting wireless networks to work should feel free to chime in with some tips or something). -- Kawigi
Ahhh! You just mentioned the only Microsoft product line worth mentioning! Hurry over to that H2Wiki of mine and make a page for yourself. And feel entirely welcome to join the [Clan of Bobs]. It's open for anyone with manners, and you have plenty of that! I connect my XBox using something called Netgear Wireless Game Adapter. Can't say what encryption style I use. It's a long key anyway, not that 40bit crap. -- PEZ
@PEZ: There is a small difference in that WEP is about twenty minutes to crack while WPA is reasonably secure. They've entirely different encryption schemes backing them. @Kawigi: I'm assuming you've updated your laptop's wireless settings to reflect the change; what's the error you're getting? If you're on XP SP2 it should just be a matter of go to wireless network connection, change the preference for your home connection to WEP, type in your new key and repair or reset the connection. -- Kuuran
The error I keep getting is that the host didn't assign me an internet address or something. I believe it's correctly detecting the encryption type and channel and all that, and that I'm using the right key (should be the same as I used to set up my X-Box, right?), and that the network is really usable (because my X-Box can connect to it when I turn it on). -- Kawigi
Are your router and laptop both set to use DHCP? Sounds like one might not be. If you aren't using DHCP, then check the laptop's wireless TCP/IP configuration. Does the laptop work with any other wireless network? You may also want to try disabling the wired network adapter while using wireless, as certain configs may leave the wrong (wired) gateway behind as default route. -- Kuuran
I generally unplug any network cables before trying to connect to the wireless network. I have both the router and the laptop set to get the IP and DNS addresses dynamically from the ISP (I assume that that means DHCP). I also have the router configured in the LAN IP settings to be a DHCP server on the network. I can also connect with the same router settings except using no encryption or using WPA-PSK encryption just fine, so if it's not a problem with WEP, it's a problem with something that's not getting automatically configured under WEP that does otherwise. -- Kawigi
Well, it looks like I've diagnosed the problem now, or at least fixed it ( :-) ). I checked to see if there were new drivers for my wireless card, and I found one and installed it and after rebooting, it works again :-) The question remains as to how I got a wireless card that couldn't connect to a WEP network, though... -- Kawigi
That's strange, but hey, if it works ;) I now present a second linux question: I have access to a quad Xeon 2.8 GHz box as well as a multitude of P4 2.8GHz boxes that I believe hyperthread, some or all of which I'd like to run roborumble@home on at some point. How do I set processor affinity? I've never had to do this before, and google isn't being terribly forthcoming. -- Kuuran
I recently decided to give linux a shot, so I'm not very familiar with it yet, but I've had trouble getting robocode to work. I've extracted the jar file as much as I can then I opened the terminal and gave the command sh robocode.sh as someone advised me to do on the repository forum. Then the robocode loading icon thing comes up then disappears a few seconds later and the program never runs. The terminal shows how far its getting and it stops when it says its initializing the main run class. What am I doing wrong, or how should I do it? -Germ
I just got Linux, too... (I'm using Kubuntu). And robocode won't even RUN for me! Help? --Bayen
@Bayen - try downloading sun's java via the command line using : sudo aptitude install sun-java6-bin sun-java6-jdk sun-java6-jre sun-java6-plugin you can get java5|java6 i use java6. Hope this helps =)
I know I have Java since the installer ran and set up Robocode. (Got it from the package manager...) My problem is running the robocode.sh file... I type in
sh robocode.shor
sh /media/flashdrive/Games/robocode/robocode.shinto Konsole (I'm in Kubuntu), but nothing happens... --Bayen
Have you set your system to use Sun java?
sudo update-alternatives --config javaand selecting the sun version should make it work, I'm running on Xubuntu. -- Skilgannon
Don't know whether this makes a difference, but I run it using the command ./robocode.sh
-- Simonton
That helped! I was able to run it from ~/robocode. But I usually develop in /media/USB/robocode, then back up on the hard drive... when I try to run from my USB key, I get this:
bayen@laptop:/media/USB/robocode$ ./robocode.sh
bash: ./robocode.sh: /bin/sh: bad interpreter: Permission denied
So is it hopeless (I can always just work on the hard drive) or is there some fix I can work? --Bayen
Try: ls -l /media/USB/robocode/robocode.sh
... What does it say all the way on the left (e.g., rwxr-xr-x)? If it's just the permissions on robocode.sh, you could fix it with: chmod 755 /media/USB/robocode/robocode.sh
. -- Voidious
Yah, its the permissions, which are the bane of newer linux users. Aside from syntax you probably have never heard of, the 'odd' placement of programs and libraries, oh also the lack of most commercial software. :) But seriously, linux is great (there are some cmmercial stuff on linux, just not enough imho, mostly the games) --Chase-san
2 edit conflicts... I searched for "bad interpreter: Permission denied" on google. This was at the bottom of the first result:
The problem with this situation is that you are trying to run a shell file on a partition for which you have no exec rights. I.e. an USB disk, a CD or DVD or some extended, logical hard disk or network partition.
In my case, I have my home dirs installed on a different partition, /dev/hda5. (This gives me freedom to reinstall Linux any time without tampering with my users' data and config/settings.)
Solution: Anyway, I needed to add the 'exec' option to the /etc/fstab file when mounting that partition. :) If it says 'defaults' on the line in /etc/fstab, then it also means you don't have exec rights on it. Easy as pie! Piece of cake!
Another workaround, when you can't or don't want to mess with the fstab, is to compile/install source only from /tmp. That will always work!Anyway, I know on Windows working from a USB drive when you could be working from a hard drive is dumb. :P It takes forever to build the robot database. Running from a hard drive on Linux is the opposite extreme, where building the robot database for the whole rumble takes like 3 seconds. I have chosen the opposite extreme :). Now if I could only get everything else to work ... -- Simonton
@Voidious: -rwxr-xr-x 1 bayen root 230 2007-10-06 15:51 robocode.sh
is what I got from the ls... I tried chmod 775, and it accepted it, but didn't help... --Bayen
Looks like the file itself was already executable - it's probably the thing Simonton posted. How about running it from the hard drive and backing up to the USB drive, though? =) -- Voidious
Ah well... works for me! :D Working off the USB worked well in Windows, but it's a real pain to do in Linux, the home directory is so much easier... I think I'm going to have to change my habit anyways... ;)
Thanks for all the help, though! Would have sucked if I had to go back to Windows just because Robocode wouldn't work... (I'm doing my grad project to design a Team with a friend of mine, so Robocode working is a REQUIREMENT!) --Bayen