home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jhelp.z / run.bat < prev    next >
DOS Batch File  |  1997-07-30  |  2KB  |  84 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 hello example.  The important commands are
  6. rem  summarized here:
  7. rem
  8. rem    rmiregistry
  9. rem    javac -d ..\.. *.java
  10. rem    rmic -d ..\.. examples.hello.HelloImpl
  11. rem    java -Djava.rmi.server.codebase="your_url" examples.hello.HelloImpl
  12. rem    appletviewer index.html
  13.  
  14. echo ************************************************************************
  15. echo *
  16. echo * This script goes through the complete process of compiling and
  17. echo * running the hello example on your local machine.
  18.  
  19. echo *
  20. echo * To compile and run server, temporarily add the root directory
  21. echo * of these classes (..\..) to CLASSPATH...
  22. echo *
  23. @echo on
  24. set ORIGCLASSPATH=%CLASSPATH%
  25. set CLASSPATH=%TOPDIR%;%CLASSPATH%
  26. @echo off
  27.  
  28. echo *
  29. echo * Start the RMI registry...
  30. echo *
  31. @echo on
  32. start /min rmiregistry
  33. @echo off
  34.  
  35. echo *
  36. echo * Compile all Java sources files...
  37. echo *
  38. @echo on
  39. javac -d %TOPDIR% *.java
  40. @echo off
  41.  
  42. echo *
  43. echo * Run rmic to generate stub and skeleton classes for HelloImpl...
  44. echo *
  45. @echo on
  46. rmic -d %TOPDIR% examples.hello.HelloImpl
  47. @echo off
  48.  
  49. echo *
  50. echo * Start the server examples.hello.HelloImpl...
  51. echo *
  52. @echo on
  53. start java examples.hello.HelloImpl
  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 on
  75. appletviewer index.html
  76. @echo off
  77.  
  78. echo *
  79. echo * If all the preceding steps were successful, the registry and server
  80. echo * processes are still running.  You can manually destroy these windows
  81. echo * to clean up before running this script again.
  82. echo *
  83.  
  84.