- Created Tuesday, June 7th 2016 @ 11:27:01
I packed the java starterbot (4 java files, completely unchanged) into a zip file and uploaded that. The error persists:
Java HotSpot(TM) 64-Bit Server VM warning: No monotonic clock was available - timed services may be adversely affected if the time-of-day clock changes Error: Could not find or load main class BotStarter Input dump
Running testcase /opt/aigames/etc/teststictactoe/testtictactoe.txt... Testing Bot with setup input... ... finished testcase in 0.169999998063 seconds Test failed: no output
- Created Tuesday, June 7th 2016 @ 11:33:06
What if you upload the .zip file directly? Are you by any chance on a Mac?
- Created Tuesday, June 7th 2016 @ 11:40:53
Ah! First success: The zip file uploaded directly works. It seems like the tip above - NOT to compress the folder, but only the files - is wrong. The zip file does contain a folder WITH the files inside
- Created Tuesday, June 7th 2016 @ 11:44:11
Now I tried the same with my extended bot - compressing the folder "bot" with all java files inside - but it still doesn't work haha.
Error: Could not find or load main class bot.MersenneTwisterFast bot.BotStarter bot.TesterTwoPlayerGames bot.BasicGame bot.UltimateTicTacToeTranspositionsBoard
- Created Tuesday, June 7th 2016 @ 11:56:20
The thing is that you have to use the same package structure in the .zip file as is specified in the .java files. So for example, if you have one file in the package bot (Main or something, so bot.Main). You have to upload it in that structure as well. So zip the whole folder called bot.
This is the same way as you would when you run Java programs from the commandline.
- Created Tuesday, June 7th 2016 @ 12:07:00
My files all declare the package "bot", just like the starterbot does... and I also zipped the "bot" folder with them... So now again I'm looking for any differences
- Created Tuesday, June 7th 2016 @ 13:22:35
OK problem no. 1 found: no file except for BotStarter is allowed to have a main method, even if it is commented out. This seemed to result in all those "could not find or load" errors, apparently.
- Created Tuesday, June 7th 2016 @ 13:46:33
Problem no. 2 found: If you want to refer to a file in the same "bot" folder, you need to specify "src/bot/filename" instead of just "filename" which works on my computer
- Created Tuesday, June 7th 2016 @ 13:54:59
Sweet! Seems like it's playing ranked games now!
- Created Tuesday, June 7th 2016 @ 13:56:27
Great :) Good job on finding all this stuff out.