Having Trouble Running a Java GitHub Repo in Replit

Here’s my code: TryCatcherDemo - Replit

After cloning my working GitHub program, I added a .replit file consisting of: run = “sh main.sh”
I added a main.sh consisting of: javac *.java; java Catcher

I’m getting the error: unable to run, main file “main.sh” not found. Any ideas what I’m doing wrong?

I couldn’t get it working from your link, but got it working through a manual import. Hopefully you can work back the usage from there? https://replit.com/@DavidAtReplit/exampleWorkingJava

1 Like

Thank you so much, David, for the time you obviously spent with that, but I can’t get it to work with the link you sent me (not even trying to fix my replit yet) Is a .replit file with that level of detail and a replit.nix file always required to run something from GitHub?

No - it was just the quickest way for me to get the java file running. I’ll have another look - or if anyone else in the community has any better advice?