Every time I need to delete the previous files to force the compiler not cache
I compile it using:
javac Main.java
and other imported files are nor compiled, until deleted
Every time I need to delete the previous files to force the compiler not cache
I compile it using:
javac Main.java
and other imported files are nor compiled, until deleted
Of course you don't want ALL imported classes to be deleted (java.lang
?) but only your project. Simple: Delete all .class
files in your output folder, recursively, with your shell's tools. If you have a dedicated output folder you can just delete the whole folder.
Best method: Learn a build tool like Maven or Ant and use the integrated ways to clean a project output, e.g. with Maven mvn clean
. Or if you use an IDE with a built-in builder (e.g. Eclipse) there might be a clean option for the project.
This is not a "cache" in a strict sense.