It keeps running the same code no matter the changes i make

Problem description

i cleared out the default “hello world” and pasted my own code, no matter what I do and how many files I make, it keeps running the same hello world

Expected behavior

prompt
"Enter employee name: "
wait for input

Actual behavior

“Hello world”
end

Steps to reproduce

open a project, (java in my case) run the code, modify it, it will not run the modified code

Browser

Chrome

OS

Windows 10

Device if mobile

n/a

Plan

free

Hey @SinaAV welcome to the forums!

Can you provide a link to your Repl so we can take a look at what’s causing the issue?

https://replit.com/@SinaAV/DeepSmoothPackagedsoftware#src/main/java/Driver.java

@SinaAV the reason the problem is happening is because of the naming of your Java file (Driver.java) you could change the file name to be Main.java or fix it via the .replit file. To open this, inside of your Repl click on the three dots next to where Files > is. Click Show Hidden Files and go to the .replit file, now scroll down to run = and entrypoint = and change them to this

run = "java -classpath .:target/dependency/* Driver"
entrypoint = "src/main/java/Driver.java" 

I hope this helps!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.