Greetings and questions

Post Reply
jos
Posts: 5
Joined: Sat Sep 06, 2008 11:47 pm

Greetings and questions

Post by jos »

Hello everyone. I recently found this interesting game, and decided to try it out a bit. However, I ran into some difficulties, and I hope someone will be able to give me some help :)

I can't seem to not 'run natively' because then the Random class can't be found. Is there a specific order in which the libraries have to be on the build path in Eclipse, or am I forgetting something obvious?
The exact exception I get (as soon as I press Go from the simulator) is :

Code: Select all

ojvm.operations.LinkE: not found: Random.class
	at ojvm.operations.DirectoryClassLoading.findClass(DirectoryClassLoading.java:46)
	at ojvm.machine.ControlUnit.findClass(ControlUnit.java:266)
	at org.hacker.engine.war.HackVMWarSpinalCord.initClass(HackVMWarSpinalCord.java:63)
	at org.hacker.engine.war.HackVMWarSpinalCord.<init>(HackVMWarSpinalCord.java:55)
	at org.hacker.engine.war.HackVMWarSpinalCordFactory.createSpinalCord(HackVMWarSpinalCordFactory.java:42)
	at org.hacker.engine.war.Faction.addUnit(Faction.java:46)
	at org.hacker.engine.war.WarModel.genFactions(WarModel.java:60)
	at org.hacker.engine.war.WarModel.<init>(WarModel.java:50)
	at org.hacker.engine.war.WarChooser.runIt(WarChooser.java:126)
	at org.hacker.engine.Chooser$4.actionPerformed(Chooser.java:160)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Thanks in advance.
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

hey there. the simulator does some pretty insane things with the class loading when the "Sync random" box is checked. it's not totally guaranteed to work. have you tried native without that?

cheers,
adum
jos
Posts: 5
Joined: Sat Sep 06, 2008 11:47 pm

Post by jos »

Hmm, I don't have a "Sync random" box, just "run natively" and "generate new seed on launch". I've tried both with and without that last box checked, but it gives the same results.
Also, just to clarify, running natively works perfectly (as long as I put my standard JRE above BitBaths rt.jar, if I don't I cant System.out.println either and I get the same exception when running), but I'm trying to run in a "production" environment (to see if the stuff I've written until now works there).
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

ah hmmn, i wonder if i forgot to upload the most recent SDK? i'll look into that.

the thing that might help you is the "production" environment is actually the non-native. ie, if it works in non-native, it will work right on our server. the native mode is just for fast testing.

cheers,
adum
jos
Posts: 5
Joined: Sat Sep 06, 2008 11:47 pm

Post by jos »

The md5sum of the zip I downloaded is c5bf08d6347360e43b3fd4ba88ba57f6, if that helps any :)
jos
Posts: 5
Joined: Sat Sep 06, 2008 11:47 pm

Post by jos »

Managed to get non-native mode working by modifying runSimulator.java to specify the absolute path instead of the relative path to rt.jar.
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

ah, sounds like eclipse had a working directory the simulator didn't expect. glad you got it working, thanks for reporting back.

adum
Post Reply