vert-x3 / vertx-lang-js

Nashorn JavaScript implementation for Vert.x
Apache License 2.0
35 stars 23 forks source link

No way to change the default debug js directory: ".vertx/debug-js" #71

Open chengenzhao opened 7 years ago

chengenzhao commented 7 years ago

Hi:

We try to change the .vertx file to another directory e.g. "user.home/com/company/temp_directory" and we use the way of setting CACHE_DIR_BASE_PROP_NAME to our default directory it works OK but the vert.x still created the .vertx directory so we investigated this problem and found in the file: io.vertx.lang.js.ClasspathFileResolver.java the DEBUG_JS_SOURCE_DIR is fixed to ".vertx/debug-js" private static File DEBUG_JS_SOURCE_DIR = new File(".vertx/debug-js"); and there is no way to change it thus if the vertx has no right to access this directory then it will cause the whole system failed so we suggest to use CACHE_DIR_BASE_PROP_NAME to replace ".vertx" prefix make it like: new File(System.getProperty(CACHE_DIR_BASE_PROP_NAME, DEFAULT_CACHE_DIR_BASE) + System.getProperty("file.separator") + "debug-js"); then put the debug files into out preset temp directory

chengenzhao commented 7 years ago

Sourcecode file: https://github.com/vert-x3/vertx-lang-js/blob/master/src/main/java/io/vertx/lang/js/ClasspathFileResolver.java