Getting multiple files in java on replit to print

Question: Can anyone help me with an issue? I have to use replit to create 10 files with a different exercise, i dont have any error in my code but nothing prints. i dont know how to get any extra files that arent the Main.js file to print.

**Repl link/Link https://replit.com/@Dylan223/Assignment-2-lab-2#src/main/java/Exercise1.java

Screenshots, links, or other helpful context:

code snippet

Do you still need help with this?

1 Like

Instead of chanhing the entrypoint each time, if you want to run the last edited file:

1 Like

could you explain more on where in the .replit file i have to go to put all this in? sorry i ran out of replies for 12 hours

yes i do, your solution only worked for Exercise1 (what me and you were working on last night.

Hey @Dylan223!

To access the .replit file, go into your Repl, go where it says Files > click on the three dots and press Show Hidden Files then the .replit file should be there. I hope this helps!

1 Like

Im at the part, just confused on where and what i’m supposed to replace with the .replit screenshot above from last night

You’d just add the large code block above everything in the file, not replacing anything

1 Like

So just past everything into the .replit file before the first line named compile?

Yes, and then run kill 1.

1 Like

okay so i just tried that and it still only prints the Exercise1 file still not prining anything else, even left the hello world statement in the main.js file. I tried kill 1 (prints the file i need) kill 2 kill 3(still only prints Exercise1 file)

Did you edit a different file after adding the code? It should run the most recent file you edit.

1 Like

no, I have no idea whats going on really. Ive got all 10 files completed, none of the files have any error so i dont have to edit anything. my other classmates got this to work on the spot with no issue but for some reason even if i start over and create a new repl nothing prints.

No I mean the way the code you added works is that it runs the most recent file you edit, so even if it’s just adding/removing a space, that’ll still edit it and should change the file that gets run.

2 Likes