@@ -77,14 +77,15 @@ public Main(final String mId, final String mainClass, final File... cp)
7777 this .mId = ModuleIdentifier .create (mId );
7878 this .executor = Executors .newSingleThreadExecutor (task -> new Thread (task , "HotSwap" ));
7979 this .scanner = new Watcher (this ::onChange , new Path []{basedir .toPath () });
80- includes ("**/*.class,**/*.conf,**/*.properties,*.js, src/*.js" );
80+ includes ("**/*.class" + File .pathSeparator + "**/*.conf" + File .pathSeparator
81+ + "**/*.properties" + File .pathSeparator + "*.js" + File .pathSeparator + "src/*.js" );
8182 excludes ("" );
8283 }
8384
8485 public static void main (final String [] args ) throws Exception {
8586 List <File > cp = new ArrayList <File >();
86- String includes = "**/*.class,**/*.conf,**/*.properties,*.js, src/*.js" ;
87- String excludes = "" ;
87+ String includes = null ;
88+ String excludes = null ;
8889 for (int i = 2 ; i < args .length ; i ++) {
8990 String [] option = args [i ].split ("=" );
9091 if (option .length < 2 ) {
@@ -102,7 +103,7 @@ public static void main(final String[] args) throws Exception {
102103 setSystemProperties (new File (option [1 ]));
103104 break ;
104105 case "deps" :
105- String [] deps = option [1 ].split (":" );
106+ String [] deps = option [1 ].split (File . pathSeparator );
106107 for (String dep : deps ) {
107108 cp .add (new File (dep ));
108109 }
@@ -118,9 +119,13 @@ public static void main(final String[] args) throws Exception {
118119 cp .add (new File (System .getProperty ("user.dir" )));
119120 }
120121
121- Main launcher = new Main (args [0 ], args [1 ], cp .toArray (new File [cp .size ()]))
122- .includes (includes )
123- .excludes (excludes );
122+ Main launcher = new Main (args [0 ], args [1 ], cp .toArray (new File [cp .size ()]));
123+ if (includes != null ) {
124+ launcher .includes (includes );
125+ }
126+ if (excludes != null ) {
127+ launcher .excludes (excludes );
128+ }
124129 launcher .run ();
125130 }
126131
@@ -248,7 +253,7 @@ private Path relativePath(final Path path) {
248253
249254 private static PathMatcher pathMatcher (final String expressions ) {
250255 List <PathMatcher > matchers = new ArrayList <PathMatcher >();
251- for (String expression : expressions .split ("," )) {
256+ for (String expression : expressions .split (File . pathSeparator )) {
252257 matchers .add (FileSystems .getDefault ().getPathMatcher ("glob:" + expression .trim ()));
253258 }
254259 return new PathMatcher () {
0 commit comments