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

  • Home
  • SEARCH
  • 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 7852513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:26:18+00:00 2026-06-02T19:26:18+00:00

Background I stumbled upon an old applet of mine which is extremely outdated (parts

  • 0

Background

I stumbled upon an old applet of mine which is extremely outdated (parts of it from 2001), and I would really like to bring it back from the dead! The applet should open a file in its native application (among other things), but this doesn’t work on the latest Windows versions (including Windows 7), it works well on Windows XP.

        try {
                if (Class.forName("com.ms.security.PolicyEngine") != null) {
                    PolicyEngine.assertPermission(PermissionID.EXEC);
                    PolicyEngine.assertPermission(PermissionID.FILEIO);
                    PolicyEngine.assertPermission(PermissionID.NETIO);
                    PolicyEngine.assertPermission(PermissionID.UI);
                    PolicyEngine.assertPermission(PermissionID.USERFILEIO);
                    PolicyEngine.assertPermission(PermissionID.CLIENTSTORE);
                } 
                else {
                } 
         } catch (Throwable e) {
         }

Problem/Solution

I am pretty sure that the above code has something to do with it. Is it as easy as just removing this code completely and then re-signing the applet? Or do I need to re-implement it with the java.security package instead before signing it? If I need to re-implement it with java.security, is it enough just using something similar:

       try {
                if (Class.forName("java.security.Policy") != null) {            
                    final Permissions permissions = new Permissions();
                    permissions.add( new java.security.AllPermission());
                    } 
                else {
                }                 
        } catch (Throwable e) {
        }

What do I need to make it work on Windows 7?

The applet is using Java version 1.5.0 (J2SE 5.0).

.

Cheers.

UPDATE

Here is the code that works in Windows XP, but does not seem to execute in Windows 7.

    String command = '"' + sDir + sFileName + '"';
    Runtime myRuntime = Runtime.getRuntime();
    try {
        myRuntime.exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + command);
        gGfx.setStatusText("File opened.");
        gGfx.drawStatusBar(1);
    } catch (IOException e) {

        System.out.println("Error " + e.getMessage());
    }
  • 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-06-02T19:26:21+00:00Added an answer on June 2, 2026 at 7:26 pm

    Is it as easy as just removing this code completely and then re-signing the applet?

    That is the solution here.

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

Sidebar

Related Questions

Background: I would like to dismiss a modalView that I have presented earlier and
Background: Using unix, codeigniter from localhost. I'd like to run a controllers via a
I recently stumbled over the D programming Language and i really like it. You
I've stumbled upon a strage behavior of richfaces. Some background about my view structure:
Background: I'm using the (fantastic) Vim plugin python-mode , which includes the pep8 linter.
Background : I'm trying to convert some JavaScript code which uses the the Crossfilter
I made a game for symbian^3 with QML . and I stumbled upon one
I'm writing a script in AutoHotKey, and I've stumbled upon an impasse. Right now
Background I'm prototyping a conversion from our RDBMS database to MongoDB. While denormalizing, it
I stumbled upon the weirdest behavior in IE6/FF3 when setting custom height (even if

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.