(String[] args)
| 445 | } |
| 446 | |
| 447 | public static void main(String[] args) { |
| 448 | try { |
| 449 | if (args.length >= 4 |
| 450 | && "javawebstart".equals(args[3]) |
| 451 | && !runningWebStart()) { |
| 452 | System.setProperty("javawebstart.version", "fake"); |
| 453 | } |
| 454 | if (runningWebStart()) { |
| 455 | String testClass = args.length > 0 |
| 456 | ? args[0] : WebStartTest.class.getName(); |
| 457 | String testMethod = args.length > 1 |
| 458 | ? args[1] : "testLaunchedUnderWebStart"; |
| 459 | int port = args.length > 2 |
| 460 | ? Integer.parseInt(args[2]) : 8080; |
| 461 | |
| 462 | try { |
| 463 | if (args.length >=5 |
| 464 | && "arch64=true".equals(args[4]) |
| 465 | && !Platform.is64Bit()) { |
| 466 | throw new Error("Cannot run 64-bit test on 32-bit javaws"); |
| 467 | } |
| 468 | else { |
| 469 | Throwable t = runTestCaseTest(testClass, testMethod, port); |
| 470 | sendResults(t, port); |
| 471 | } |
| 472 | } |
| 473 | catch(Throwable t) { |
| 474 | try { |
| 475 | sendResults(t, port); |
| 476 | } |
| 477 | catch(Throwable e) { |
| 478 | // Can't communicate back to launching process |
| 479 | showMessage("ERROR: " + e.getMessage()); |
| 480 | } |
| 481 | } |
| 482 | } |
| 483 | else { |
| 484 | junit.textui.TestRunner.run(WebStartTest.class); |
| 485 | } |
| 486 | } |
| 487 | catch(Throwable t) { |
| 488 | showMessage("ERROR: " + t.getMessage()); |
| 489 | } |
| 490 | // NOTE: System.exit with non-zero status causes an error dialog |
| 491 | // on w32 sun "1.6.0_14" (build 1.6.0_14-b08) |
| 492 | System.exit(0); |
| 493 | } |
| 494 | } |
nothing calls this directly
no test coverage detected