Entry point for the JspC command-line tool. @param arg Command-line arguments
(String[] arg)
| 366 | * @param arg Command-line arguments |
| 367 | */ |
| 368 | public static void main(String[] arg) { |
| 369 | if (arg.length == 0) { |
| 370 | System.out.println(Localizer.getMessage("jspc.usage")); |
| 371 | } else { |
| 372 | JspC jspc = new JspC(); |
| 373 | try { |
| 374 | jspc.setArgs(arg); |
| 375 | if (jspc.helpNeeded) { |
| 376 | System.out.println(Localizer.getMessage("jspc.usage")); |
| 377 | } else { |
| 378 | jspc.execute(); |
| 379 | } |
| 380 | } catch (JasperException | BuildException e) { |
| 381 | System.err.println(e); |
| 382 | if (jspc.dieLevel != NO_DIE_LEVEL) { |
| 383 | System.exit(jspc.dieLevel); |
| 384 | } |
| 385 | } |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | /** |
| 390 | * Apply command-line arguments. |
nothing calls this directly
no test coverage detected