-
Place your Java files in the
src/
directory. -
To compile:
javac src/Main.java
-
To run:
java -cp src Main
You can replace Main.java
and Main
with your own class names as needed.
Feel free to dump any Java code into src/
and use the above commands to compile and run.