< prev index next >

src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java

Print this page




 122     public void error(String msg, String arg1) {
 123         output(getText(msg, arg1));
 124     }
 125 
 126     public void error(String msg, String arg1, String arg2) {
 127         output(getText(msg, arg1, arg2));
 128     }
 129 
 130     /**
 131      * Usage
 132      */
 133     public void usage() {
 134         error("rmic.usage", program);
 135     }
 136 
 137     /**
 138      * Run the compiler
 139      */
 140     public synchronized boolean compile(String argv[]) {
 141 
 142         /*
 143          * Handle internal option to use the new (and incomplete) rmic
 144          * implementation.  This option is handled here, rather than
 145          * in parseArgs, so that none of the arguments will be nulled
 146          * before delegating to the new implementation.
 147          */
 148         // disable the -Xnew option as per JDK-8146299 and JDK-8145980
 149         // to allow further discussion how to progress with this feature
 150         //for (int i = 0; i < argv.length; i++) {
 151         //    if (argv[i].equals("-Xnew")) {
 152         //        return (new sun.rmi.rmic.newrmic.Main(out,
 153         //                                              program)).compile(argv);
 154         //    }
 155         //}
 156 
 157         if (!parseArgs(argv)) {
 158             return false;
 159         }
 160 
 161         if (classes.size() == 0) {
 162             usage();
 163             return false;
 164         }
 165 
 166         if ((flags & F_WARNINGS) != 0) {
 167             for (Generator g : generators) {
 168                 if (g instanceof RMIGenerator) {
 169                     output(getText("rmic.jrmp.stubs.deprecated", program));
 170                     break;
 171                 }
 172             }
 173         }
 174 
 175         return doCompile();
 176     }




 122     public void error(String msg, String arg1) {
 123         output(getText(msg, arg1));
 124     }
 125 
 126     public void error(String msg, String arg1, String arg2) {
 127         output(getText(msg, arg1, arg2));
 128     }
 129 
 130     /**
 131      * Usage
 132      */
 133     public void usage() {
 134         error("rmic.usage", program);
 135     }
 136 
 137     /**
 138      * Run the compiler
 139      */
 140     public synchronized boolean compile(String argv[]) {
 141 















 142         if (!parseArgs(argv)) {
 143             return false;
 144         }
 145 
 146         if (classes.size() == 0) {
 147             usage();
 148             return false;
 149         }
 150 
 151         if ((flags & F_WARNINGS) != 0) {
 152             for (Generator g : generators) {
 153                 if (g instanceof RMIGenerator) {
 154                     output(getText("rmic.jrmp.stubs.deprecated", program));
 155                     break;
 156                 }
 157             }
 158         }
 159 
 160         return doCompile();
 161     }


< prev index next >