diff --git a/mozilla/java/plugins/examples/MediaPlayer/JMPlayer.java b/mozilla/java/plugins/examples/MediaPlayer/JMPlayer.java new file mode 100644 index 00000000000..35d444f983e --- /dev/null +++ b/mozilla/java/plugins/examples/MediaPlayer/JMPlayer.java @@ -0,0 +1,163 @@ +import javax.media.*; +import javax.media.util.*; +import javax.media.format.*; +import javax.media.bean.playerbean.*; +import javax.media.control.*; + + +import org.mozilla.pluglet.*; +import org.mozilla.pluglet.mozilla.*; +import org.mozilla.pluglet.mozilla.PlugletTagInfo2; +import java.awt.*; +import java.awt.event.*; +import java.awt.print.*; +import java.io.*; +import java.util.*; + + +public class JMPlayer implements Pluglet { + public JMPlayer() { + } + + public PlugletInstance createPlugletInstance(String mimeType) { + return new JMPlayerInstance(); + } + + public void initialize(PlugletManager manager) { + } + + public void shutdown() { + } +} + +class JMPlayerInstance implements PlugletInstance, ControllerListener { + PlugletInstancePeer peer; + Dimension defaultSize; + Frame frm; + int w, h; + MediaPlayer player = null; + + Panel panel; + + public synchronized void controllerUpdate(ControllerEvent ce) { + if(ce instanceof RealizeCompleteEvent) { + player.prefetch(); + } + if(ce instanceof PrefetchCompleteEvent) { + Dimension dim = player.getPreferredSize(); + frm.pack(); + panel.setSize(dim); +// player.setBounds(0, 0, w, h); + frm.setSize(defaultSize); + player.start(); + frm.show(); + } + } + + public JMPlayerInstance() { + } + + public void initialize(PlugletInstancePeer peer) { + PlugletTagInfo2 info = (PlugletTagInfo2)peer.getTagInfo(); + w = info.getWidth(); + h = info.getHeight(); + defaultSize = new Dimension(w, h); + this.peer = peer; + } + + public boolean playFile(String url) { + player.setMediaLocator(new MediaLocator(url)); + if(player.getPlayer() == null) { + return false; + } else { + player.addControllerListener(this); + player.realize(); + } + return true; + } + + public void start() { + player = new MediaPlayer(); + panel = new Panel(); + panel.add(player); + } + + public void stop() { + (new Exception()).printStackTrace(); + player.stop(); + player.deallocate(); + player.close(); + } + + public void destroy() { + } + + public PlugletStreamListener newStream() { + org.mozilla.util.Debug.print("--TestInstance.newStream\n"); + JMPlayerStreamListener listener = new JMPlayerStreamListener(); + listener.setPlayer(this); + return listener; + } + + public void setWindow(Frame frame) { + if(frame == null) { + return; + } + if(panel == null) { + System.out.println("++ Initialize failed."); + return; + } +// PlugletTagInfo2 info = (PlugletTagInfo2)peer.getTagInfo(); +// defaultSize = new Dimension(info.getWidth(), info.getHeight()); + frame.setSize(defaultSize); + frame.setLayout(new BorderLayout()); + frame.add(panel); + frm=frame; + } + + public void print(PrinterJob printerJob) { + } +} + +class JMPlayerStreamListener implements PlugletStreamListener { + JMPlayerInstance jmp; + int total=0; + + public JMPlayerStreamListener() { + } + + public void onStartBinding(PlugletStreamInfo streamInfo) { + + + if(!jmp.playFile(streamInfo.getURL())) { + System.out.println("++ Error starting player "); + return; + } + + } + + public void setPlayer(JMPlayerInstance jmp) { + this.jmp = jmp; + } + + public void onDataAvailable(PlugletStreamInfo streamInfo, InputStream input,int length) { + } + + public void onFileAvailable(PlugletStreamInfo plugletInfo, String fileName) { + } + + public void onStopBinding(PlugletStreamInfo plugletInfo,int status) { + System.out.println("++ On stop binding."); + } + + public int getStreamType() { + return 1; + } + +} + + + + + + diff --git a/mozilla/java/plugins/examples/MediaPlayer/README b/mozilla/java/plugins/examples/MediaPlayer/README new file mode 100644 index 00000000000..30e6e045ca4 --- /dev/null +++ b/mozilla/java/plugins/examples/MediaPlayer/README @@ -0,0 +1,43 @@ +MediaPlayer Pluglet Example. +================================ + +This directory contains the source code for MediaPlayer pluglet example. +Pluglet is using Java Media Frameworks 2.0b MediaPlayer bean. + +======================================================================== +Win32 Build Directions: +======================================================================== +Requirements: + +* built latest mozilla tree for WinNT4.0 + +* JDK1.3 + +* built Java-Implemented Plugins. + +* JMF2.0b installed. + +How To Build: + +* add jmf.jar to classpath + +* type "nmake /f makefile.win" + + +How to Run: + +* Follow the directions in ..\..\README + +* Add jmf.jar to classpath + +* Set PLUGLET environment to the directory you have JMPlayer.jar + +* Run mozilla and load page play.html from this directory and you will see + sample avi file. (In addition you need to download some avi file and + name it test.avi.) + +Warning: JMF MediaPlayer does not support all the video formats so you can +see some errors from player when loading unsupported format file. + + + diff --git a/mozilla/java/plugins/examples/MediaPlayer/makefile.win b/mozilla/java/plugins/examples/MediaPlayer/makefile.win new file mode 100644 index 00000000000..6ed420e4562 --- /dev/null +++ b/mozilla/java/plugins/examples/MediaPlayer/makefile.win @@ -0,0 +1,26 @@ +# +# The contents of this file are subject to the Mozilla Public License +# Version 1.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# The Initial Developer of the Original Code is Sun Microsystems, +# Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems, +# Inc. All Rights Reserved. + +.SUFFIXES: .java .class +.java.class: + $(JDKHOME)\bin\javac -classpath "../../classes;$(CLASSPATH)" $< +default: JMPlayer.jar +JMPlayer.jar: JMPlayer.class manifest + $(JDKHOME)\bin\jar cvfm JMPlayer.jar manifest *.class + +clobber: + -del *.class *.jar +export: JMPlayer.jar + copy *.jar $(PLUGLET) \ No newline at end of file diff --git a/mozilla/java/plugins/examples/MediaPlayer/manifest b/mozilla/java/plugins/examples/MediaPlayer/manifest new file mode 100644 index 00000000000..b5d98e6e15b --- /dev/null +++ b/mozilla/java/plugins/examples/MediaPlayer/manifest @@ -0,0 +1,2 @@ +MIMEDescription: video/mpeg;video/quicktime;video/avi:avi;mpg;mpeg;mov:Pluglet JMPlayer +Pluglet-Class: JMPlayer diff --git a/mozilla/java/plugins/examples/MediaPlayer/play.html b/mozilla/java/plugins/examples/MediaPlayer/play.html new file mode 100644 index 00000000000..0473bf0f878 --- /dev/null +++ b/mozilla/java/plugins/examples/MediaPlayer/play.html @@ -0,0 +1,5 @@ + + + + + diff --git a/mozilla/java/plugins/examples/pdf/PDFView.java b/mozilla/java/plugins/examples/pdf/PDFView.java new file mode 100644 index 00000000000..8c613c18f49 --- /dev/null +++ b/mozilla/java/plugins/examples/pdf/PDFView.java @@ -0,0 +1,149 @@ +import java.net.URL; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JEditorPane; +import org.mozilla.pluglet.*; +import org.mozilla.pluglet.mozilla.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.print.*; +import java.io.*; +import java.util.Vector; + +import com.adobe.acrobat.Viewer; + +public class PDFView implements Pluglet { + public PDFView() { + } + public PlugletInstance createPlugletInstance(String mimeType) { + try { + return new PDFViewInstance(); + } catch(Exception e) { + } + return null; + } + public void initialize(PlugletManager manager) { + } + public void shutdown() { + } +} + +class PDFViewInstance extends Viewer implements PlugletInstance { + JScrollPane view; + com.adobe.acrobat.Viewer acr; + Dimension defaultSize; + JPanel panel; + Frame frm; + + public void displayPDF(byte[] b) { + InputStream input = (InputStream)(new ByteArrayInputStream(b)); + frm.removeAll(); + try { + acr = new com.adobe.acrobat.Viewer(false); + acr.setDocumentInputStream(input); + +// acr.zoomTo(1.0); + acr.activate(); //WithoutBars() + acr.execMenuItem(com.adobe.acrobat.ViewerCommand.OneColumn_K); + acr.execMenuItem(com.adobe.acrobat.ViewerCommand.FitWidth_K); + } catch(Exception e) { + System.out.println("++ Error loading file."); + } + + acr.setSize(new Dimension(defaultSize.width, defaultSize.height)); + view.add(acr); + view.setPreferredSize(defaultSize); + frm.add(view); + frm.pack(); + frm.show(); + } + + + public PDFViewInstance() throws Exception { + } + + public void initialize(PlugletInstancePeer peer) { + PlugletTagInfo2 info = (PlugletTagInfo2)peer.getTagInfo(); + defaultSize = new Dimension(info.getWidth(), info.getHeight()); + } + public void start() { + view = new JScrollPane(); + } + public void stop() { + frm.dispose(); + if(acr!=null) acr.deactivate(); + } + public void destroy() { + if(acr!=null) acr.destroy(); + } + public PlugletStreamListener newStream() { + PDFViewStreamListener listener = new PDFViewStreamListener(); + listener.setViewer(this); + return listener; + } + public void setWindow(Frame frame) { + if (frame == null) { + return; + } + frm=frame; + frm.setSize(defaultSize); + } + public void print(PrinterJob printerJob) { + } +} + +class PDFViewStreamListener implements PlugletStreamListener { + PDFViewInstance viewer; + int total = 0, length = 0, first = 0; + byte[] b, bb; + Vector v = new Vector(20, 20); + + public void setViewer(PDFViewInstance view) { + viewer = view; + } + public PDFViewStreamListener() { + } + public void onStartBinding(PlugletStreamInfo streamInfo) { + bb = new byte[streamInfo.getLength()]; + total = 0; + first = 0; + } + + public void onDataAvailable(PlugletStreamInfo streamInfo, InputStream input,int length) { + try { + int size = input.available(); + int r = 0; + b = new byte[size]; + + r=input.read(b); + + for(int i=total;i=streamInfo.getLength()) { + input.close(); + viewer.displayPDF(bb); + } + + } catch(Exception e) { + System.out.println(e.toString()); + } + + } + + public void onFileAvailable(PlugletStreamInfo streamInfo, String fileName) { + } + public void onStopBinding(PlugletStreamInfo streamInfo,int status) { + } + public int getStreamType() { + return 1; + } +} + + + + + + diff --git a/mozilla/java/plugins/examples/pdf/README b/mozilla/java/plugins/examples/pdf/README new file mode 100644 index 00000000000..b628d391f42 --- /dev/null +++ b/mozilla/java/plugins/examples/pdf/README @@ -0,0 +1,40 @@ +MediaPlayer Pluglet Example. +================================ + +This directory contains the source code for Pdf Viewer pluglet example. +Pluglet is using Java "Acrobat Reader" bean. + +======================================================================== +Win32 Build Directions: +======================================================================== +Requirements: + +* built latest mozilla tree for WinNT4.0 + +* JDK1.3 + +* built Java-Implemented Plugins. + +* Java "Acrobat Reader" bean installed + (http://beta1.adobe.com/acr_viewer/bean/bean.jar) + +How To Build: + +* add acrobat.jar to classpath + +* type "nmake /f makefile.win" + + +How to Run: + +* Follow the directions in ..\..\README + +* Add acrobat.jar to classpath + +* Set PLUGLET environment to the directory you have PDFViewer.jar + +* Run mozilla and load page pdf.html from this directory and you will see + sample avi file. (In addition you need to download some pdf file and + name it test.pdf) + + diff --git a/mozilla/java/plugins/examples/pdf/makefile.win b/mozilla/java/plugins/examples/pdf/makefile.win new file mode 100644 index 00000000000..83a65041d32 --- /dev/null +++ b/mozilla/java/plugins/examples/pdf/makefile.win @@ -0,0 +1,27 @@ +# +# The contents of this file are subject to the Mozilla Public License +# Version 1.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# The Initial Developer of the Original Code is Sun Microsystems, +# Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems, +# Inc. All Rights Reserved. + +.SUFFIXES: .java .class +.java.class: + $(JDKHOME)\bin\javac -classpath "../../classes;$(CLASSPATH)" $< +default: PDFView.jar +PDFView.jar: PDFView.class manifest + $(JDKHOME)\bin\jar cvfm PDFView.jar manifest *.class + +clobber: + -del *.class *.jar + +export: PDFView.jar + copy PDFView.jar $(PLUGLET) \ No newline at end of file diff --git a/mozilla/java/plugins/examples/pdf/manifest b/mozilla/java/plugins/examples/pdf/manifest new file mode 100644 index 00000000000..815132058bc --- /dev/null +++ b/mozilla/java/plugins/examples/pdf/manifest @@ -0,0 +1,2 @@ +MIMEDescription: application/pdf::Pluglet JView +Pluglet-Class: PDFView diff --git a/mozilla/java/plugins/examples/pdf/pdf.html b/mozilla/java/plugins/examples/pdf/pdf.html new file mode 100644 index 00000000000..953579a9dcb --- /dev/null +++ b/mozilla/java/plugins/examples/pdf/pdf.html @@ -0,0 +1,5 @@ + + + + + diff --git a/mozilla/java/plugins/examples/rtf/JView.java b/mozilla/java/plugins/examples/rtf/JView.java new file mode 100644 index 00000000000..a3bad11dde1 --- /dev/null +++ b/mozilla/java/plugins/examples/rtf/JView.java @@ -0,0 +1,109 @@ +import java.net.URL; +import javax.swing.JPanel; +//import javax.swing.JScrollPane; +import javax.swing.JEditorPane; +import org.mozilla.pluglet.*; +import org.mozilla.pluglet.mozilla.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.print.*; +import java.io.*; + +public class JView implements Pluglet { + public JView() { + } + public PlugletInstance createPlugletInstance(String mimeType) { + return new JViewInstance(); + } + public void initialize(PlugletManager manager) { + } + public void shutdown() { + } +} + +class JViewInstance implements PlugletInstance { +// JScrollPane view; + ScrollPane view; + JEditorPane viewPane; + Dimension defaultSize; + JPanel panel; + Frame frm; + + public void displayURL(String url) { + frm.removeAll(); + try { + url = url.replace('|', ':'); + viewPane.setPage(url); + viewPane.setEditable(false); + } catch (IOException e) { + System.out.println("Error loading URL "+url); + } + view.add(viewPane); +// viewPane.setPreferredSize(defaultSize); + view.setSize(defaultSize); + view.doLayout(); + frm.add(view, BorderLayout.CENTER); + frm.pack(); + frm.setVisible(true); + System.out.println("++ Showing"); + } + + public JViewInstance() { + } + + public void initialize(PlugletInstancePeer peer) { + PlugletTagInfo2 info = (PlugletTagInfo2)peer.getTagInfo(); + defaultSize = new Dimension(info.getWidth(), info.getHeight()); + } + public void start() { + view = new ScrollPane(); + viewPane = new JEditorPane(); + } + public void stop() { + frm.dispose(); + } + public void destroy() { + } + public PlugletStreamListener newStream() { + JViewStreamListener listener = new JViewStreamListener(); + listener.setViewer(this); + return listener; + } + public void setWindow(Frame frame) { + if (frame == null) { + return; + } + frm=frame; + frm.setSize(defaultSize); + } + public void print(PrinterJob printerJob) { + } +} + +class JViewStreamListener implements PlugletStreamListener { + JViewInstance viewer; + + public void setViewer(JViewInstance view) { + viewer = view; + } + public JViewStreamListener() { + } + public void onStartBinding(PlugletStreamInfo streamInfo) { + viewer.displayURL(streamInfo.getURL()); + } + public void onDataAvailable(PlugletStreamInfo streamInfo, InputStream input,int length) { + } + public void onFileAvailable(PlugletStreamInfo streamInfo, String fileName) { + } + public void onStopBinding(PlugletStreamInfo streamInfo,int status) { + } + public int getStreamType() { + return 1; + } +} + + + + + + diff --git a/mozilla/java/plugins/examples/rtf/README b/mozilla/java/plugins/examples/rtf/README new file mode 100644 index 00000000000..7fb08baccb8 --- /dev/null +++ b/mozilla/java/plugins/examples/rtf/README @@ -0,0 +1,33 @@ +RTF viewer Pluglet Example. +================================ + +This directory contains the source code for RTF files +viewer pluglet example. + +======================================================================== +Win32 Build Directions: +======================================================================== +Requirements: + +* built latest mozilla tree for WinNT4.0 + +* JDK1.3 + +* built Java-Implemented Plugins. + +How To Build: + +* type "nmake /f makefile.win" + + +How to Run: + +* Follow the directions in ..\..\README + +* Set PLUGLET environment to the directory you have JView.jar + +* Run mozilla and load page view.html from this directory and you will see + this file in RTF format. + + + diff --git a/mozilla/java/plugins/examples/rtf/Readme.rtf b/mozilla/java/plugins/examples/rtf/Readme.rtf new file mode 100644 index 00000000000..623309d02b7 Binary files /dev/null and b/mozilla/java/plugins/examples/rtf/Readme.rtf differ diff --git a/mozilla/java/plugins/examples/rtf/makefile.win b/mozilla/java/plugins/examples/rtf/makefile.win new file mode 100644 index 00000000000..a69997519f3 --- /dev/null +++ b/mozilla/java/plugins/examples/rtf/makefile.win @@ -0,0 +1,26 @@ +# +# The contents of this file are subject to the Mozilla Public License +# Version 1.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# The Initial Developer of the Original Code is Sun Microsystems, +# Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems, +# Inc. All Rights Reserved. + +.SUFFIXES: .java .class +.java.class: + $(JDKHOME)\bin\javac -classpath ../../classes $< +default: JView.jar +JView.jar: JView.class manifest + $(JDKHOME)\bin\jar cvfm JView.jar manifest *.class + +clobber: + -del *.class *.jar +export: JView.jar + copy JView.jar $(PLUGLET) \ No newline at end of file diff --git a/mozilla/java/plugins/examples/rtf/manifest b/mozilla/java/plugins/examples/rtf/manifest new file mode 100644 index 00000000000..290ebf7786a --- /dev/null +++ b/mozilla/java/plugins/examples/rtf/manifest @@ -0,0 +1,2 @@ +MIMEDescription: application/rtf:rtf:Pluglet JView +Pluglet-Class: JView diff --git a/mozilla/java/plugins/examples/rtf/view.html b/mozilla/java/plugins/examples/rtf/view.html new file mode 100644 index 00000000000..fc243f8957c --- /dev/null +++ b/mozilla/java/plugins/examples/rtf/view.html @@ -0,0 +1,5 @@ + + + + + diff --git a/mozilla/java/plugins/examples/zip/README b/mozilla/java/plugins/examples/zip/README new file mode 100644 index 00000000000..2938815b576 --- /dev/null +++ b/mozilla/java/plugins/examples/zip/README @@ -0,0 +1,33 @@ +ZipView Pluglet Example. +================================ + +This directory contains the source code for zip compressed files +viewer pluglet example. + +======================================================================== +Win32 Build Directions: +======================================================================== +Requirements: + +* built latest mozilla tree for WinNT4.0 + +* JDK1.3 + +* built Java-Implemented Plugins. + +How To Build: + +* type "nmake /f makefile.win" + + +How to Run: + +* Follow the directions in ..\..\README + +* Set PLUGLET environment to the directory you have ZipView.jar + +* Run mozilla and load page zip.html from this directory and you will see + the ZipView.jar contents. + + + diff --git a/mozilla/java/plugins/examples/zip/ZipView.java b/mozilla/java/plugins/examples/zip/ZipView.java new file mode 100644 index 00000000000..967ac6adab9 --- /dev/null +++ b/mozilla/java/plugins/examples/zip/ZipView.java @@ -0,0 +1,381 @@ +import javax.swing.JPanel; +import javax.swing.JButton; +import javax.swing.JTree; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreeSelectionModel; +import javax.swing.tree.TreePath; +import javax.swing.JScrollPane; + + +import org.mozilla.pluglet.*; +import org.mozilla.pluglet.mozilla.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.print.*; +import java.io.*; +import java.util.zip.*; +import java.util.Enumeration; +import java.util.Vector; + +public class ZipView implements Pluglet { + + public ZipView() { + } + + public PlugletInstance createPlugletInstance(String mimeType) { + return new ZipInstance(); + } + + public void initialize(PlugletManager manager) { + } + + public void shutdown() { + } + +} + +class Node { + public DefaultMutableTreeNode parent, name; + + public Node(DefaultMutableTreeNode parent, DefaultMutableTreeNode name) { + this.parent = parent; + this.name = name; + } + +} +class ZipInstance implements PlugletInstance { + Button extract; + byte[] b; + Frame frm; + Panel panel; + List contents; + FileDialog fsd; + boolean firstTime=true; + JTree zipTree=null; + Dimension defaultSize; + String zname; + + public ZipInstance() { + + } + + public void extractFileEntry(String name, String dir) { + ZipInputStream zis = new ZipInputStream((InputStream)(new ByteArrayInputStream(b))); + ZipEntry en; + try { + do { + en = zis.getNextEntry(); + } while (!en.toString().equals(name)); + + int size=(int)en.getSize(); + byte[] buff = new byte[size]; + + String path=dir+name; + int last = path.lastIndexOf('/'); + File dd=null, ff=null; + if(last!=-1) { + path=path.substring(0, last); + dd = new File(path); + dd.mkdirs(); + ff = new File(dir+name); + } else { + dd = new File(dir); + dd.mkdirs(); + ff = new File(dir+name); + } + + FileOutputStream fos = new FileOutputStream(ff); + int r = 0; + int t = 0; + do { + r = zis.read(buff, 0, size); + fos.write(buff, 0, r); + t+=r; + } while(t0) { + name = path.substring(start, end); + start = end+1; + } + else + name = path.substring(start); + + for(int i=1;i<=depth;i++) { + if(!el.hasMoreElements()) { + addElement(name, v); + break; + } else { + n = (Node)el.nextElement(); + if(n.name.toString().equals(name)) { + break; + } + else { + replaceElement(name, v, depth); + break; + } + } + } + depth++; + } while (end!=-1 && start=streamInfo.getLength()) { + input.close(); + zip.processData(bb, fname); + } + + } catch(Exception e) { + System.out.println(e.toString()); + } + } + + public void onFileAvailable(PlugletStreamInfo streamInfo, String fileName) { + } + + public void onStopBinding(PlugletStreamInfo streamInfo,int status) { + } + + public int getStreamType() { + return 1; + } +} + + + + + + diff --git a/mozilla/java/plugins/examples/zip/makefile.win b/mozilla/java/plugins/examples/zip/makefile.win new file mode 100644 index 00000000000..38a1bf618b9 --- /dev/null +++ b/mozilla/java/plugins/examples/zip/makefile.win @@ -0,0 +1,26 @@ +# +# The contents of this file are subject to the Mozilla Public License +# Version 1.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# The Initial Developer of the Original Code is Sun Microsystems, +# Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems, +# Inc. All Rights Reserved. + +.SUFFIXES: .java .class +.java.class: + $(JDKHOME)\bin\javac -classpath ../../classes $< +default: ZipView.jar +ZipView.jar: ZipView.class manifest + $(JDKHOME)\bin\jar cvfm ZipView.jar manifest *.class + +clobber: + -del *.class *.jar +export: ZipView.jar + copy ZipView.jar $(PLUGLET) \ No newline at end of file diff --git a/mozilla/java/plugins/examples/zip/manifest b/mozilla/java/plugins/examples/zip/manifest new file mode 100644 index 00000000000..2c48f890844 --- /dev/null +++ b/mozilla/java/plugins/examples/zip/manifest @@ -0,0 +1,2 @@ +MIMEDescription: application/x-zip-compressed:zip:Pluglet ZipView +Pluglet-Class: ZipView diff --git a/mozilla/java/plugins/examples/zip/zip.html b/mozilla/java/plugins/examples/zip/zip.html new file mode 100644 index 00000000000..5c05502bca8 --- /dev/null +++ b/mozilla/java/plugins/examples/zip/zip.html @@ -0,0 +1,5 @@ + + + + +