Instantiation Exception in IE browser but no problem in JView- appletviewer of MSJVM while hosting a applet embedding word document
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ajiyos_Yohannan
Posted On:   Tuesday, April 24, 2001 05:59 AM

Hello Friend, The following code is to show a MSWord or MSPowerPoint or MSExcel in an applet. It worked fine in the JView the applet viewer of MSJavaVM. But while i tried to run it in a IE 5 browser it is showing java.lang.InstantiationException in the Java console as below. No problem with Signing and all. Please help me to solve this with thanks in advance Ajiyos ********************************************************* java.lang.InstantiationException: AppletMSO at com/ms/applet/BrowserAppletFrame.newInstance (BrowserAppletFrame.java) at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java) at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java) at com/ms/applet/Appl   More>>

Hello Friend,
The following code is to show a MSWord or MSPowerPoint or MSExcel in an applet. It worked fine in the JView the applet viewer of MSJavaVM. But while i tried to run it in a IE 5 browser it is showing java.lang.InstantiationException in the Java console as below. No problem with Signing and all. Please help me to solve this
with thanks in advance
Ajiyos
*********************************************************
java.lang.InstantiationException:
AppletMSO
at com/ms/applet/BrowserAppletFrame.newInstance (BrowserAppletFrame.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.run (AppletPanel.java)
at java/lang/Thread.run (Thread.java)
*****************************************************************
import shdocvw.*;
import com.ms.com.Variant;
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
import com.ms.security.*;

public class AppletMSO extends Applet implements ActionListener
{

shdocvw.WebBrowser browser = new shdocvw.WebBrowser();

Button bw= new Button("Word");
Button bp= new Button("Powerpoint");
Button be= new Button("Excel");
Panel pn=new Panel();
Panel pc=new Panel(new BorderLayout());
public void init()
{
try {
if (Class.forName("com.ms.security.PolicyEngine") != null)
PolicyEngine.assertPermission(PermissionID.SYSTEM);
}
catch (Throwable cnfe){ }

display();
}

public void actionPerformed(ActionEvent ae)
{
if(ae.getSource().equals(bw))
{
navigate("http://localhost/AppletMSO/hi.doc");
}
if(ae.getSource().equals(be))
{
navigate("http://localhost/AppletMSO/orgtree.xls");
}
if(ae.getSource().equals(bp))
{
navigate("http://localhost/AppletMSO/iiss.pps");
}
}

public void display()
{
try{
bw.addActionListener(this);
bp.addActionListener(this);
be.addActionListener(this);
setLayout(new BorderLayout() );

setBackground(Color.lightGray);

pn.add(bw);
pn.add(be);
pn.add(bp);
pc.add("Center",browser);
add("North",pn);
add("Center",pc);
setBounds(150,100,900,800);
setVisible(true);
}
catch(Exception e){System.out.println("Exception here");}
}

public void navigate(String url)
{
browser.Navigate(url, null, null, null, null);
}

}

   <<Less

Re: Instantiation Exception in IE browser but no problem in JView- appletviewer of MSJVM while hosting a applet embedding word document

Posted By:   John_Zukowski  
Posted On:   Tuesday, April 24, 2001 06:15 AM

The com.ms.* packages are only available in the MS VM.
About | Sitemap | Contact