Handle java correct
@@ -83,10 +83,10 @@ class JavaCompiler(Compiler):
def compute_parameters_with_absolute_paths(self, parameter_list, build_dir):
for idx, i in enumerate(parameter_list):
- if i[:4] == '-cp:' or i[:4] == '-cp;':
- parameter_list[idx] = i[:4] + os.path.normpath(os.path.join(build_dir, i[4:]))
- if i[:11] == '-classpath:' or i[:11] == '-classpath;':
- parameter_list[idx] = i[:11] + os.path.normpath(os.path.join(build_dir, i[11:]))
+ if i in ['-cp', '-classpath', '-sourcepath'] and idx + 1 < len(parameter_list):
+ path_list = parameter_list[idx + 1].replace(';', ':').split(':')
+ path_list = [os.path.normpath(os.path.join(build_dir, x)) for x in path_list]
+ parameter_list[idx + 1] = ':'.join(path_list)
return parameter_list
