I am trying to change the path to the cache.ccf file for about an hour ...
When I call JCS.getInstance("myRegion"); I get this error:
Exception in thread "main" java.lang.IllegalStateException: Failed to load properties for name [/cache.ccf]
I tried putting cache.ccf in the src folder. In this case, everything is fine. But I want it to be in the ./config/ directory, not in ./src . I tried changing the name of the configuration file:
JCS.setConfigFilename("../config/cache.ccf");
But it does not work, and I get the same error:
Exception in thread "main" java.lang.IllegalStateException: Failed to load properties for name [../config/cache.ccf]
This means that JCS is trying to find a file named "../config/cache.ccf" in the src directory.
Here I found this sentence:
The class path must include the directory in which the file is located, or the file must be placed at the root of the class path, as it is automatically detected.
But my application does not work, even if the cache.ccf file is in the root directory of the project.
How to change the path to the cache.ccf file?
shift66
source share