home *** CD-ROM | disk | FTP | other *** search
/ Java Developer's Companion / Java Developer's Companion.iso / documentation / jdk113 / docs / guide / rmi / examples / stock / RUN.BAT < prev    next >
Encoding:
DOS Batch File  |  1997-08-16  |  2.3 KB  |  82 lines

  1. @echo off
  2. set TOPDIR=..\..
  3.  
  4. rem  This BAT script explains and carries out the process of compiling
  5. rem  and running the stock example.  The important commands are
  6. rem  summarized here:
  7. rem
  8. rem    javac -d ..\.. *.java
  9. rem    rmic -d ..\.. examples.stock.StockServer examples.stock.StockApplet
  10. rem    java examples.stock.StockServer
  11. rem    appletviewer index.html
  12.  
  13. echo ************************************************************************
  14. echo *
  15. echo * This script goes through the complete process of compiling and
  16. echo * running the stock example on your local machine.
  17. echo *
  18. echo * (The stock server is bundled with its own registry, so there
  19. echo * is no need to create one.)
  20. echo *
  21. echo * To compile and run server, temporarily add root directory
  22. echo * of these classes (..\..) to CLASSPATH...
  23. echo *
  24. @echo on
  25. set ORIGCLASSPATH=%CLASSPATH%
  26. set CLASSPATH=%TOPDIR%;%CLASSPATH%
  27. @echo off
  28.  
  29. echo *
  30. echo * Compile all Java sources files...
  31. echo *
  32. @echo on
  33. javac -d %TOPDIR% *.java
  34. @echo off
  35.  
  36. echo *
  37. echo * Run rmic to generate stub and skeleton classes for StockServer
  38. echo * StockApplet...
  39. echo *
  40. @echo on
  41. rmic -d %TOPDIR% examples.stock.StockServer examples.stock.StockApplet
  42. @echo off
  43.  
  44. echo *
  45. echo * Start the server examples.stock.StockServer...
  46. echo *
  47. @echo on
  48. start java examples.stock.StockServer
  49. @echo off
  50.  
  51. echo *
  52. echo * Please wait until a message appears in the server process's window
  53. echo * indicating that it has been bound to the registry.
  54. echo *
  55. pause
  56.  
  57. echo *
  58. echo * Restore the original CLASSPATH at this point, so that the appletviewer
  59. echo * will not have any of these example classes locally available through
  60. echo * CLASSPATH.  Therefore, it must load them through the codebase...
  61. echo *
  62. @echo on
  63. set CLASSPATH=%ORIGCLASSPATH%
  64. @echo off
  65.  
  66. echo *
  67. echo * Start the appletviewer...
  68. echo *
  69. echo *---------------------------------------------------------------------
  70. echo * NOTE: Expect a SecurityException -- ignore it if there is only one 
  71. echo *---------------------------------------------------------------------
  72. @echo on
  73. appletviewer index.html
  74. @echo off
  75.  
  76. echo *
  77. echo * If all the preceding steps were successful, the server
  78. echo * processes is still running.  You can manually destroy this window
  79. echo * to clean up before running this script again.
  80. echo *
  81.  
  82.