home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / RMI_OS / RMI-PREB / EXAMPLES / STOCK / RUN.BAT < prev    next >
Encoding:
DOS Batch File  |  1996-11-04  |  2.6 KB  |  87 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. rem     
  13. rem  NOTE: The "call" command is used below to execute the other BAT
  14. rem  script "rmic" so that it returns to this script upon
  15. rem  completion.  The "call" is not be necessary when these commands
  16. rem  are executed directly from the command prompt.
  17.  
  18. echo ************************************************************************
  19. echo *
  20. echo * This script goes through the complete process of compiling and
  21. echo * running the stock example on your local machine.
  22. echo *
  23. echo * (The stock server is bundled with its own registry, so there
  24. echo * is no need to create one.)
  25. echo *
  26. echo * To compile and run server, temporarily add root directory
  27. echo * of these classes (..\..) to CLASSPATH...
  28. echo *
  29. @echo on
  30. set ORIGCLASSPATH=%CLASSPATH%
  31. set CLASSPATH=%TOPDIR%;%CLASSPATH%
  32. @echo off
  33.  
  34. echo *
  35. echo * Compile all Java sources files...
  36. echo *
  37. @echo on
  38. javac -d %TOPDIR% *.java
  39. @echo off
  40.  
  41. echo *
  42. echo * Run rmic to generate stub and skeleton classes for StockServer
  43. echo * StockApplet...
  44. echo *
  45. @echo on
  46. call rmic -d %TOPDIR% examples.stock.StockServer examples.stock.StockApplet
  47. @echo off
  48.  
  49. echo *
  50. echo * Start the server examples.stock.StockServer...
  51. echo *
  52. @echo on
  53. start java examples.stock.StockServer
  54. @echo off
  55.  
  56. echo *
  57. echo * Please wait until a message appears in the server process's window
  58. echo * indicating that it has been bound to the registry.
  59. echo *
  60. pause
  61.  
  62. echo *
  63. echo * Restore the original CLASSPATH at this point, so that the appletviewer
  64. echo * will not have any of these example classes locally available through
  65. echo * CLASSPATH.  Therefore, it must load them through the codebase...
  66. echo *
  67. @echo on
  68. set CLASSPATH=%ORIGCLASSPATH%
  69. @echo off
  70.  
  71. echo *
  72. echo * Start the appletviewer...
  73. echo *
  74. echo *---------------------------------------------------------------------
  75. echo * NOTE: Expect a SecurityException -- ignore it if there is only one 
  76. echo *---------------------------------------------------------------------
  77. @echo on
  78. appletviewer index.html
  79. @echo off
  80.  
  81. echo *
  82. echo * If all the preceding steps were successful, the server
  83. echo * processes is still running.  You can manually destroy this window
  84. echo * to clean up before running this script again.
  85. echo *
  86.  
  87.