langtools/test/tools/javac/diags/Example.java
changeset 40308 274367a99f98
parent 38519 d70d50ec27bb
child 41931 d7c9720c4223
equal deleted inserted replaced
40306:1a0fcaf3f2ed 40308:274367a99f98
   221 
   221 
   222             // hack to automatically add exports; a better solution would be to grep the
   222             // hack to automatically add exports; a better solution would be to grep the
   223             // source for import statements or a magic comment
   223             // source for import statements or a magic comment
   224             for (File pf: procFiles) {
   224             for (File pf: procFiles) {
   225                 if (pf.getName().equals("CreateBadClassFile.java")) {
   225                 if (pf.getName().equals("CreateBadClassFile.java")) {
   226                     pOpts.add("-XaddExports:jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED");
   226                     pOpts.add("--add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED");
   227                 }
   227                 }
   228             }
   228             }
   229 
   229 
   230             new Jsr199Compiler(verbose).run(null, null, false, pOpts, procFiles);
   230             new Jsr199Compiler(verbose).run(null, null, false, pOpts, procFiles);
   231             opts.add("-classpath"); // avoid using -processorpath for now
   231             opts.add("-classpath"); // avoid using -processorpath for now
   246             opts.add("-sourcepath");
   246             opts.add("-sourcepath");
   247             opts.add(srcPathDir.getPath());
   247             opts.add(srcPathDir.getPath());
   248         }
   248         }
   249 
   249 
   250         if (moduleSourcePathDir != null) {
   250         if (moduleSourcePathDir != null) {
   251             opts.add("-modulesourcepath");
   251             opts.add("--module-source-path");
   252             opts.add(moduleSourcePathDir.getPath());
   252             opts.add(moduleSourcePathDir.getPath());
   253             files = moduleSourcePathFiles;
   253             files = moduleSourcePathFiles;
   254         }
   254         }
   255 
   255 
   256         if (additionalFiles.size() > 0) {
   256         if (additionalFiles.size() > 0) {