diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2005-06-24 09:35:11 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2005-06-24 09:35:11 +0000 |
commit | 9b1411e58b65a464f1d92ba1dbdbf00494ca9ffd (patch) | |
tree | 6df9f3853bb7a4fa50002e97af38d7624d8a3be2 /sample | |
parent | cb8fe912651b896794f4b4211fe4a74d7781a647 (diff) | |
download | javassist-9b1411e58b65a464f1d92ba1dbdbf00494ca9ffd.tar.gz javassist-9b1411e58b65a464f1d92ba1dbdbf00494ca9ffd.zip |
updates comments
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@186 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'sample')
-rw-r--r-- | sample/evolve/DemoServer.java | 3 | ||||
-rw-r--r-- | sample/evolve/WebPage.class.0 | bin | 686 -> 0 bytes | |||
-rw-r--r-- | sample/evolve/WebPage.class.1 | bin | 812 -> 0 bytes | |||
-rw-r--r-- | sample/evolve/WebPage.java | 14 | ||||
-rw-r--r-- | sample/evolve/demo.html | 3 | ||||
-rw-r--r-- | sample/evolve/sample/evolve/WebPage.java | 20 | ||||
-rw-r--r-- | sample/evolve/start.html | 14 |
7 files changed, 31 insertions, 23 deletions
diff --git a/sample/evolve/DemoServer.java b/sample/evolve/DemoServer.java index d69d055f..dd64c550 100644 --- a/sample/evolve/DemoServer.java +++ b/sample/evolve/DemoServer.java @@ -19,7 +19,8 @@ import java.io.*; * server overwrites WebPage.class (class file) and calls update()
* in VersionManager so that WebPage.class is loaded into the JVM
* again. The new contents of WebPage.class are copied from
- * either WebPage.class.0 or WebPage.class.1.
+ * either sample/evolve/WebPage.class
+ * or sample/evolve/sample/evolve/WebPage.class.
*/
public class DemoServer extends Webserver {
diff --git a/sample/evolve/WebPage.class.0 b/sample/evolve/WebPage.class.0 Binary files differdeleted file mode 100644 index 3cc1d743..00000000 --- a/sample/evolve/WebPage.class.0 +++ /dev/null diff --git a/sample/evolve/WebPage.class.1 b/sample/evolve/WebPage.class.1 Binary files differdeleted file mode 100644 index fe49380e..00000000 --- a/sample/evolve/WebPage.class.1 +++ /dev/null diff --git a/sample/evolve/WebPage.java b/sample/evolve/WebPage.java index 7c2b7cfb..7d420fef 100644 --- a/sample/evolve/WebPage.java +++ b/sample/evolve/WebPage.java @@ -8,7 +8,6 @@ import java.util.*; * show() on the created object.
*/
-// WebPage.class.0
public class WebPage {
public void show(OutputStreamWriter out) throws IOException {
Calendar c = new GregorianCalendar();
@@ -16,16 +15,3 @@ public class WebPage { out.write("<P><A HREF=\"demo.html\">Return to the home page.</A>");
}
}
-/*
-// WebPage.class.1
-public class WebPage {
- public void show(OutputStreamWriter out) throws IOException {
- out.write("<H2>Current Time:</H2>");
- Calendar c = new GregorianCalendar();
- out.write("<CENTER><H3><FONT color=\"blue\">");
- out.write(c.getTime().toString());
- out.write("</FONT></H3></CENTER><HR>");
- out.write("<P><A HREF=\"demo.html\">Return to the home page.</A>");
- }
-}
-*/
diff --git a/sample/evolve/demo.html b/sample/evolve/demo.html index 6be4a2c3..3eedf3da 100644 --- a/sample/evolve/demo.html +++ b/sample/evolve/demo.html @@ -31,7 +31,8 @@ again, you will see a different page on your browser. <P>Web server: <A HREF="DemoServer.java"><code>DemoServer.java</code></A>
-<P>WebPage: <A HREF="WebPage.java"><code>WebPage.java</code></A>
+<P>WebPage: <A HREF="WebPage.java"><code>WebPage.java</code></A> and
+another <A HREF="sample/evolve/WebPage.java"><code>WebPage.java</code></A>
<P>Class loader: <A HREF="DemoLoader.java"><code>DemoLoader.java</code></A>,
<A HREF="Evolution.java"><code>Evolution.java</code></A>, and
diff --git a/sample/evolve/sample/evolve/WebPage.java b/sample/evolve/sample/evolve/WebPage.java new file mode 100644 index 00000000..507b9564 --- /dev/null +++ b/sample/evolve/sample/evolve/WebPage.java @@ -0,0 +1,20 @@ +package sample.evolve;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Updatable class. DemoServer instantiates this class and calls
+ * show() on the created object.
+ */
+
+public class WebPage {
+ public void show(OutputStreamWriter out) throws IOException {
+ out.write("<H2>Current Time:</H2>");
+ Calendar c = new GregorianCalendar();
+ out.write("<CENTER><H3><FONT color=\"blue\">");
+ out.write(c.getTime().toString());
+ out.write("</FONT></H3></CENTER><HR>");
+ out.write("<P><A HREF=\"demo.html\">Return to the home page.</A>");
+ }
+}
diff --git a/sample/evolve/start.html b/sample/evolve/start.html index d31d9d08..8ab3f940 100644 --- a/sample/evolve/start.html +++ b/sample/evolve/start.html @@ -1,14 +1,14 @@ <h2>Instructions</h2>
<p>1. Compile <code>sample/evolve/*.java</code>.
- Copy <code>WebPage.class</code> to <code>WebPage.class.0</code>.
-<p>2. Edit <code>Webpage.java</code>, compile it,
- and copy <code>WebPage.class</code> to <code>WebPage.class.1</code>.
-<br><code>WebPage.class.0</code> and
- <code>WebPage.class.1</code> are used
- for changing the contents of <code>WebPage.class</code> during
- the demo.
+<p>2. change the current directory to <code>sample/evolve</code><br>
+and compile there <code>sample/evolve/WebPage.java</code><br>
+(i.e. compile <code>sample/evolve/sample/evolve/WebPage.java</code>).
+
+<p>The two versions of <code>WebPage.class</code> are used<br>
+for changing the contents of <code>WebPage.class</code> during
+the demo.
<p>3. Run the server on the local host (where your web browser is running):
|