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 @@