Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

HTML launcher doesn't load

+6 votes
I am trying to launch the HTML launcher but I get an error "Error: Could not find or load main class". I used the same code on the tutorial, but I am curious if because of the second tutorial if I broke a connection, or if it is just me... I also tried building it with gradle again to see if that fixed the issue. but it did not.
asked Sep 2, 2017 in CSC 285 (F17) by Daniel Zwiener (100 points)
When/where do you get the "Error: could not find or load main class"?  From the web browser, or from Eclipse?
I tried running it as a java application, where do I go to run it as a gradle superDev?

1 Answer

+1 vote
Best answer

On the lab machines, I thought that if you tried to click the "Run" button, it would offer you a "Gradle..." choice.

However, on my Linux laptop at home, it's not doing that, so maybe your Mac is similar.  Try this instead:

Right click on the whole starter-game-html project on the left panel, choose Run as -> Run Configurations.

Once that pops up, click on the green "Gradle Project" on the left side, and do "New Launch Configuration".

Name it something meaningful, like htmlLauncher and then enter html:superDev in the Gradle Tasks field.  Try running it...

If it all builds successfully, then you should be able to open a web browser and put in localhost:8080/html/ to play the game in-browser.  Any luck?

answered Sep 4, 2017 by Forrest Stonedahl (100 points)
selected Sep 21, 2017 by Daniel Zwiener
When I run it the gradle execution begins but stops at "Calculate task graph" I had to setup the workspace and I tried both the game-html and game-core, I have no luck with either of those choices.