Skip to main content

alphaWorks  >  Forums  >  CodeRally  >  developerWorks

Problem running against samples    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 3 - Pages: 1 - Last Post: Jan 1, 2009 4:37 AM Last Post By: vickram Threads: [ Previous | Next ]

Posts: 2
Registered: Sep 04, 2007 04:44:17 PM
Problem running against samples
Posted: Sep 04, 2007 04:47:56 PM
Click to report abuse...   Click to reply to this thread Reply
Hi,

I installed the CodeRally program today and had no difficulties following the instructions I found on how to do it and everything installed just as it said it should.

So I wrote up a small program for the car and went to test it by clicking on the "Run against samples" button. This brought up the splash screen and requested that I choose the opponents I wanted to run against. After selecting a few and pressing "Ok", it simply stayed on the splash screen. Looking in the Console box in Eclipse I could see a huge number of errors being displayed. Here's the log it generated:

QuoteException in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at java.io.RandomAccessFile.getChannel(Unknown Source)
at sun.font.TrueTypeFont.open(Unknown Source)
at sun.font.TrueTypeFont.verify(Unknown Source)
at sun.font.TrueTypeFont.<init>(Unknown Source)
at sun.font.FontManager.resolveFontFiles(Unknown Source)
at sun.font.FontManager.resolveWindowsFonts(Unknown Source)
at sun.font.FontManager.getFullNameToFileMap(Unknown Source)
at sun.font.FontManager.findFontFromPlatform(Unknown Source)
at sun.font.FontManager.findFont2D(Unknown Source)
at sun.font.FontManager.findFont2D(Unknown Source)
at java.awt.Font.getFont2D(Unknown Source)
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.font.FontDesignMetrics.getMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.ibm.coderally.RallySkin.paintConsoleBackground(RallySkin.java:565)
at com.ibm.coderally.RallySkin.paintMatchBackground(RallySkin.java:389)
at com.ibm.jgfw.internal.ui.PlaybackComponent.paint(PlaybackComponent.java:228)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at com.ibm.jgfw.internal.ui.MainWindow.paint(MainWindow.java:204)
at com.ibm.jgfw.internal.ui.MainWindow.update(MainWindow.java:211)
at sun.awt.RepaintArea.updateComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.SecurityException: Member access is not allowed
at com.ibm.jgfw.internal.util.GameSecurityManager.checkMemberAccess(GameSecurityManager.java:127)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredField(Unknown Source)
at sun.nio.ch.Reflect.lookupField(Unknown Source)
at sun.nio.ch.FileChannelImpl.<clinit>(Unknown Source)
... 39 more
Exception in thread "Playback thread" java.lang.SecurityException: Member access is not allowed
at com.ibm.jgfw.internal.util.GameSecurityManager.checkMemberAccess(GameSecurityManager.java:127)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at java.lang.Thread$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Thread.auditSubclass(Unknown Source)
at java.lang.Thread.isCCLOverridden(Unknown Source)
at java.lang.Thread.init(Unknown Source)
at java.lang.Thread.<init>(Unknown Source)
at java.awt.EventDispatchThread.<init>(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.EventQueue.initDispatchThread(Unknown Source)
at java.awt.EventQueue.postEventPrivate(Unknown Source)
at java.awt.EventQueue.postEvent(Unknown Source)
at sun.awt.PostEventQueue.flush(Unknown Source)
at sun.awt.SunToolkit.flushPendingEvents(Unknown Source)
at java.awt.EventQueue.postEvent(Unknown Source)
at java.awt.Component.repaint(Unknown Source)
at java.awt.Component.repaint(Unknown Source)
at java.awt.Component.repaint(Unknown Source)
at com.ibm.jgfw.internal.ui.PlaybackComponent.engineUpdate(PlaybackComponent.java:147)
at com.ibm.jgfw.internal.ui.PlaybackComponent$1.actionPerformed(PlaybackComponent.java:99)
at com.ibm.jgfw.internal.PlaybackEngine.fireActionEvent(PlaybackEngine.java:179)
at com.ibm.jgfw.internal.PlaybackEngine.frameForwardImpl(PlaybackEngine.java:269)
at com.ibm.jgfw.internal.PlaybackEngine$2.statusChanged(PlaybackEngine.java:222)
at com.ibm.jgfw.internal.StatusObject.fireStatusChangedEvent(StatusObject.java:69)
at com.ibm.jgfw.internal.Match.addState(Match.java:67)
at com.ibm.jgfw.internal.GameEngine.runMatch(GameEngine.java:98)
at com.ibm.jgfw.internal.PlaybackThread.run(PlaybackThread.java:54)[/Quote]

Does anyone have any ideas as to what the problem may be?

Thanks,

-Trek

Posts: 2
Registered: Sep 04, 2007 04:44:17 PM
Re: Problem running against samples
Posted: Sep 04, 2007 05:05:56 PM   in response to: in response to: 's post
Click to report abuse...   Click to reply to this thread Reply
Never mind...it turns out it was because I was running the 1.6 version of Java rather than the 1.5 version. Setting it back to run on that fixed all my problems.
Guest
Re: Problem running against samples
Posted: Dec 30, 2008 11:45:23 PM   in response to: in response to: 's post
Click to report abuse...   Click to reply to this thread Reply
hi I am able to run the program but i dont know how to move the cars..The cars are there but not moving..
how Am i supposed to do that..
Thanx,
vickram

Posts: 1
Registered: Jan 01, 2009 04:22:12 AM
Re: Problem running against samples
Posted: Jan 01, 2009 04:37:38 AM   in response to: Guest in response to: Guest's post
Click to report abuse...   Click to reply to this thread Reply
Hi
I think you did not start the game server.
for a trial you can put this code in RallyCar.move method to check..

setThrottle(MAX_THROTTLE);

and this should allow you to move the car.

vickrampurswani@gmail.com

Point your RSS reader here for a feed of the latest messages in all forums