Skip to content
Permalink
Browse files
Fix tests on windows in non-forked mode.
  • Loading branch information
dkulp committed Nov 12, 2014
1 parent 8d5b444 commit 1747a9cbc21f85b65da08b78b6bfbc08fd80420d
Showing 1 changed file with 14 additions and 11 deletions.
@@ -104,6 +104,17 @@ public int run() throws Exception {
urls.add(file.toURI().toURL());
}
}
for (int x = 0; x < args.length; x++) {
if ("-classpath".equals(args[x])) {
File file = getFile(args[x + 1], listener);
if (file != null && file.exists()) {
cpList.add(file.getAbsolutePath());
urls.add(file.getAbsoluteFile().toURI().toURL());
}
x++;
}
}

final ClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]),
this.getClass().getClassLoader());

@@ -147,6 +158,9 @@ public void addCatalog(File catalogFile) throws IOException {
catResolver.getCatalog().parseCatalog(catalogFile.getPath());
}
};
for (URL url : urls) {
opt.classpaths.add(url);
}
if (checkXmlElementRef()) {
opt.target = SpecVersion.V2_1;
}
@@ -345,17 +359,6 @@ public static void main(String[] args) throws Exception {
XJCErrorListener listener = new XJCErrorListener(context);

List<String> cplist = new ArrayList<String>();
for (int x = 0; x < args.length; x++) {
if ("-classpath".equals(args[x])) {
cplist.add(args[x + 1]);
File file = getFile(args[x + 1], listener);
if (file != null && file.exists()) {
args[x + 1] = file.getAbsolutePath();
}
x++;
}
}


File outputFile = getFile(args[args.length - 1], listener);
if (outputFile == null) {

0 comments on commit 1747a9c

Please sign in to comment.