I am having this exception on title. I have been following a LibGDX programming PDF, everything was working perfectly and then this code have been implemented, and it isnt working anymore. I should add that Rock and Starfish are classes on my project, and there is no typo on class names Caught message: java.lang.ClassNotFoundException: Rock […]
Categories
Class Not Found Exception on Class.forName()
- Post author By Gaming World
- Post date May 23, 2020
- No Comments on Class Not Found Exception on Class.forName()
- Tags "Rock")) turtle.preventOverlap(rockActor); for (BaseActor starfishActor : BaseActor.getList(mainStage, "Starfish") == 0 && !win) { win = true; BaseActor youWinMessage = new BaseActor(0, "Starfish")) { Starfish starfish = (Starfish) starfishActor; if (turtle.overlaps(starfish) && !starfish.collected) {, 0, 100, 150, 20, 200, 250, 300, 300); youWinMessage.setOpacity(0); youWinMessage.addAction(Actions.delay(1)); youWinMessage.addAction(Actions.after(A, 350, 400, 450), 600); new Starfish(400, and it isnt working anymore. I should add that Rock and Starfish are classes on my project, and the rest of the code is copied from the book. Also, and there is no typo on class names Caught message: java.lang.ClassNotFoundException: Rock at java.net.URLClassLoader.findClass(Unknown, className).size(); } So the mainStage and Class names are indeed correct, everything was working perfectly and then this code have been implemented, I am having this exception on title. I have been following a LibGDX programming PDF, if I comment my For loop where its trying to find the Rock class, It will have the same Exception on the next For loop, mainStage); new Rock(100, mainStage); new Rock(200, mainStage); new Rock(300, mainStage); new Rock(450, mainStage); new Starfish(100, mainStage); new Starfish(200, mainStage); new Starfish(500, mainStage); ocean.loadTexture("water.jpg"); ocean.setSize(800, mainStage); turtle = new Turtle(20, mainStage); whirl.centerAtActor(starfish); whirl.setOpacity(0.25f); } } if (BaseActor.count(mainStage, mainStage); win = false; } public void update(float dt) { for (BaseActor rockActor : BaseActor.getList(mainStage, mainStage); youWinMessage.loadTexture("you-win.png"); youWinMessage.centerAtPosition(400, String className) { ArrayList list = new ArrayList(); Class theClass = null; try { theClass = Class, String className) { return getList(stage, while searching for the Starfish class. Any help? Thank you so much!