I’m new to replit, so sorry if my issue is already treated elsewhere or I don’t understand something obvious.
I use replit to host my Discord bot with JDA with a replit Java project. My program functions, but at one moment it stopped considering changes in my code. It runs the bot as if I didn’t change anything even if I comment all the code in my Main file. Is there a problem in the synchronization of the files with replit? How do I fix it? My repl
Hello. Thanks for the advice, I added a link to my repl in the main post, but I don’t have any error messages, since the program runs correctly, just without my changes.
I have had a similar problem with Java projects of my own: FakeOS Java Test Lab
In the first project, I updated the code over a month ago, but it’s
still running an old version (I can tell because the project tells
you its current version when ran).
In the second project, it also wouldn’t run my changes. In this case,
I deleted the repl, made a new one with the same name, then changed
the name, and it still runs the old code.
In both cases, there are no error messages, nor anything else to suggest
something is wrong, and the old code (the one replit is running) was
deleted and replaced by the new code.
I think I may have found the root of the problem. Since all Java replits default to having their class named “Main”, this is the only one replit ever runs, whether or not a “Main” class exists. None of my repls have a class named “Main”, as it causes some problems when running the code from my PC. I don’t know if there is a way to change which class replit defaults to though (most places just run whatever class contains the main method, and don’t try running ones that don’t exist).