Search code examples
javarythm

No able to set rythm.home.tmp.dir


The Rythm engine generates some .java and .rythm files like the following ones:

C2a55796c_5c47_3ca0_8e52_3ce1aacbd450__R_T_C__.java
C2a55796c_5c47_3ca0_8e52_3ce1aacbd450__R_T_C__.rythm

They are by default put in the root folder of the application. I wanted to set the engine to put these files in the ./temp folder, hence, passed the following config items to the engine:

Map<String, Object> conf = new HashMap<>();
conf.put("engine.precompile_mode.enabled", true);
conf.put("engine.load_precompiled.enabled", true);
conf.put("rythm.home.tmp.dir", 
        Paths.get("./temp").toAbsolutePath().normalize().toString());
engine = new RythmEngine(conf);

But it does not take the temp path into account! How can I set it so that the files go into the temp folder right beneath the application folder?


Solution

  • Not sure how your environment is set up. I did a very simple test and it shows the temp directory is correctly used: enter image description here