diff --git a/jdk/makefiles/CompileDemos.gmk b/jdk/makefiles/CompileDemos.gmk index 0a093b586a9..6cd5dd4df0d 100644 --- a/jdk/makefiles/CompileDemos.gmk +++ b/jdk/makefiles/CompileDemos.gmk @@ -65,14 +65,10 @@ $(eval $(call SetupAppletDemo,DitherTest)) $(eval $(call SetupAppletDemo,DrawTest)) $(eval $(call SetupAppletDemo,Fractal)) $(eval $(call SetupAppletDemo,GraphicsTest)) -$(eval $(call SetupAppletDemo,MoleculeViewer)) $(eval $(call SetupAppletDemo,NervousText)) $(eval $(call SetupAppletDemo,SimpleGraph)) $(eval $(call SetupAppletDemo,SortDemo)) $(eval $(call SetupAppletDemo,SpreadSheet)) -# Build WireFrame without a server since it -# has a class Matrix3D that also exists in MoleculeViewer. -$(eval $(call SetupAppletDemo,WireFrame,true)) ifndef OPENJDK $(eval $(call SetupAppletDemo,Animator,,closed/)) @@ -83,7 +79,7 @@ endif ################################################################################################## -PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf +PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj define SetupDemo # Param 1 = Name of the demo @@ -161,6 +157,8 @@ $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services : \ BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services +$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html XYZApp.java)) +$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html ThreeD.java)) $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) $(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) diff --git a/jdk/src/share/demo/applets/MoleculeViewer/XYZApp.java b/jdk/src/share/demo/applets/MoleculeViewer/XYZApp.java index 5ee3afe38ab..78c816a52a2 100644 --- a/jdk/src/share/demo/applets/MoleculeViewer/XYZApp.java +++ b/jdk/src/share/demo/applets/MoleculeViewer/XYZApp.java @@ -348,7 +348,7 @@ public class XYZApp extends Applet implements Runnable, MouseListener, InputStream is = null; try { Thread.currentThread().setPriority(Thread.MIN_PRIORITY); - is = new URL(getDocumentBase(), mdname).openStream(); + is = getClass().getResourceAsStream(mdname); XYZChemModel m = new XYZChemModel(is); Atom.setApplet(this); md = m; diff --git a/jdk/src/share/demo/applets/MoleculeViewer/example1.html b/jdk/src/share/demo/applets/MoleculeViewer/example1.html index de2e84b0943..f87aee60fe8 100644 --- a/jdk/src/share/demo/applets/MoleculeViewer/example1.html +++ b/jdk/src/share/demo/applets/MoleculeViewer/example1.html @@ -2,10 +2,10 @@ MoleculeViewer (example 1) - +

MoleculeViewer (example 1)


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! @@ -13,7 +13,7 @@
The source. - + diff --git a/jdk/src/share/demo/applets/MoleculeViewer/example2.html b/jdk/src/share/demo/applets/MoleculeViewer/example2.html index bb8f93a0b31..8468cc816b5 100644 --- a/jdk/src/share/demo/applets/MoleculeViewer/example2.html +++ b/jdk/src/share/demo/applets/MoleculeViewer/example2.html @@ -2,10 +2,10 @@ MoleculeViewer (example 2) - +

MoleculeViewer (example 2)


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! @@ -13,4 +13,4 @@
The source. - + diff --git a/jdk/src/share/demo/applets/MoleculeViewer/example3.html b/jdk/src/share/demo/applets/MoleculeViewer/example3.html index 952bc8d5cbd..c5673ea91a9 100644 --- a/jdk/src/share/demo/applets/MoleculeViewer/example3.html +++ b/jdk/src/share/demo/applets/MoleculeViewer/example3.html @@ -5,25 +5,25 @@

MoleculeViewer (example 3)


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!

- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!

- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!

- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! @@ -31,5 +31,5 @@
The source. - + diff --git a/jdk/src/share/demo/applets/WireFrame/ThreeD.java b/jdk/src/share/demo/applets/WireFrame/ThreeD.java index 935ca0a99c7..321729ae61c 100644 --- a/jdk/src/share/demo/applets/WireFrame/ThreeD.java +++ b/jdk/src/share/demo/applets/WireFrame/ThreeD.java @@ -416,7 +416,7 @@ public class ThreeD extends Applet InputStream is = null; try { Thread.currentThread().setPriority(Thread.MIN_PRIORITY); - is = new URL(getDocumentBase(), mdname).openStream(); + is = getClass().getResourceAsStream(mdname); Model3D m = new Model3D(is); md = m; m.findBB(); diff --git a/jdk/src/share/demo/applets/WireFrame/example1.html b/jdk/src/share/demo/applets/WireFrame/example1.html index 1992ee53a26..6cc9c552e32 100644 --- a/jdk/src/share/demo/applets/WireFrame/example1.html +++ b/jdk/src/share/demo/applets/WireFrame/example1.html @@ -5,7 +5,7 @@

3D Model: Cube


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! diff --git a/jdk/src/share/demo/applets/WireFrame/example2.html b/jdk/src/share/demo/applets/WireFrame/example2.html index eec2b1d429f..fb59eff3f82 100644 --- a/jdk/src/share/demo/applets/WireFrame/example2.html +++ b/jdk/src/share/demo/applets/WireFrame/example2.html @@ -5,7 +5,7 @@

3D Model: Dinosaur


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! diff --git a/jdk/src/share/demo/applets/WireFrame/example3.html b/jdk/src/share/demo/applets/WireFrame/example3.html index 2b49d118ec7..4e4f5f186df 100644 --- a/jdk/src/share/demo/applets/WireFrame/example3.html +++ b/jdk/src/share/demo/applets/WireFrame/example3.html @@ -5,7 +5,7 @@

3D Model: Hughes


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! diff --git a/jdk/src/share/demo/applets/WireFrame/example4.html b/jdk/src/share/demo/applets/WireFrame/example4.html index faf409254a1..664ee1eaa94 100644 --- a/jdk/src/share/demo/applets/WireFrame/example4.html +++ b/jdk/src/share/demo/applets/WireFrame/example4.html @@ -5,7 +5,7 @@

3D Model: knoxS


- + alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!