Ask coding questions

← Back to all posts
When I run my Java Swing program, it does not always recompile.
mrsawyer (1)

Unlike in a "regular" Java repl, in a Java Swing repl you see the java files and the class files. I made changes to a java file that had no effect when I ran the program (but should have). Then I deliberately put in a compiler error and it still ran. Then a deleted a class file and I got an "exit status 1" because it could not find the class whose class file deleted. Any ideas on how to force repl.it to recompile the code prior to running it? Thanks.

Commentshotnewtop
Highwayman (1439)

Maybe, but first it’d probably help if we could see your repl, which seems to be private. I’d suggest manually compiling your program using a .replit file and see if that changes anything.

mrsawyer (1)

Thanks for the response. Ok, how do I manually compile it using a .replit file? (and I just changed it public if that helps).

Highwayman (1439)

@mrsawyer sorry for the late reply. The docs on how to configure the run button are here: https://docs.repl.it/repls/dot-replit

mrsawyer (1)

Thanks Highwayman, that fixed it.