Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 586505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:06:51+00:00 2026-05-13T15:06:51+00:00

I am trying to view a .doc/.docx microsoft word files in a webpage on

  • 0

I am trying to view a .doc/.docx microsoft word files in a webpage on firefox. When all failed i tried creating an applet that will hold an instance of Word OLE to view the document.

I created the applet using: org.eclipse.swt.ole.win32.OleClientSite, and with in eclipse it works fine and i can see Word inside.

I created a .jar file and i tried to use the applet inside the webpage in firefox. The applet starts but i can’t see anything inside.

Here is my applet code:

import java.applet.Applet;
public class JWordViewer  extends Applet {
  org.eclipse.swt.widgets.Display display;
  org.eclipse.swt.widgets.Shell swtParent;
  java.awt.Canvas awtParent;

  public void init() {
    Thread thread = new Thread(new Runnable() {
      public void run() {
        setLayout(new java.awt.GridLayout(1, 1));
        awtParent = new java.awt.Canvas();
        add(awtParent);
        display = new org.eclipse.swt.widgets.Display();
        swtParent = org.eclipse.swt.awt.SWT_AWT.new_Shell(display,
            awtParent);
        swtParent.setLayout(new org.eclipse.swt.layout.FillLayout());
        org.eclipse.swt.ole.win32.OleFrame frame = new org.eclipse.swt.ole.win32.OleFrame(
            swtParent, org.eclipse.swt.SWT.NONE);
        org.eclipse.swt.ole.win32.OleClientSite site;
        try {
          site = new org.eclipse.swt.ole.win32.OleClientSite(frame,
              org.eclipse.swt.SWT.NONE, "Word.Document");

        } catch (org.eclipse.swt.SWTException e) {
          String str = "Create OleClientSite Error" + e.toString();
          System.out.println(str);
          return;
        }
        setSize(500, 500);
        validate();
        site.doVerb(org.eclipse.swt.ole.win32.OLE.OLEIVERB_SHOW);

        while (swtParent != null && !swtParent.isDisposed()) {
          if (!display.readAndDispatch())
            display.sleep();
        }
      }
    });
    thread.start();
  }

  public void stop() {
    if (display != null && !display.isDisposed()) {
      display.syncExec(new Runnable() {
        public void run() {
          if (swtParent != null && !swtParent.isDisposed())
            swtParent.dispose();
          swtParent = null;
          display.dispose();
          display = null;
        }
      });
      remove(awtParent);
      awtParent = null;
    }
  }
}

`

Any idea why isn’t it working?

Here is what the Java Console says:

basic: Told clients applet is started
Exception in thread "Thread-11" java.lang.ExceptionInInitializerError
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:130)
at JWordViewer$1.run(JWordViewer.java:17)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
... 3 more

And that’s after i told it to trust this applet…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:06:51+00:00Added an answer on May 13, 2026 at 3:06 pm

    Here is the answer: It needs permissions to read and execute on the disc.
    One option is to sign the .jar file. And the other option is to give permissions to the disc.

    I used for testing the second option: I modified the java.policy file like that:
    `
    grant codeBase “http://localhost/-” {
    permission java.io.FilePermission “<>”, “read, write, execute, delete”;
    permission java.net.SocketPermission ““, “accept, connect, listen, resolve”;
    permission java.util.PropertyPermission “
    “, “read, write”;
    permission java.lang.RuntimePermission “*”;
    permission java.awt.AWTPermission “showWindowWithoutWarningBanner”;
    };

    And that’s solved it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not that I'm trying to prevent 'View Source' or anything silly like that, but
I'm trying to view a users tweets from my app but twitter responses with
I'm trying to change view controllers based on a user's selection in a UIAlertView
is there any way to send whats in a text view (im trying to
Trying to create a list to return some JSON data to a view. Following
In a view I'm trying to create a new user and then log them
Im trying to add a list view to my activity. Here is what is
I am trying to access a view inside a splitter from my mainframe. At
I'm trying to create a master detail view of a linq to sql relationship
I am trying to make a search view in Django. It is a search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.