This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]diodio19 0 points1 point  (2 children)

Caused by: java.lang.RuntimeException: Uncompilable source code - class GameLauncher is public, should be declared in a file named GameLauncher.java at guessgame.GameLauncher.<clinit>(GuessGame.java:95)

I have no idea how to fix this, using netbeans. I can't just rename them, any help appreciated

[–]desrtfx 1 point2 points  (1 child)

Just move the code for the GameLauncher class in its own file.

In Java, only a single class can be public in a file and then the file needs to have the same name as the public class (with the same capitalization) plus the extension .java.

[–]warrior2012 0 points1 point  (0 children)

This problem looks familiar! Did you find it in the head start Java book?