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 4240288
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:08:43+00:00 2026-05-21T03:08:43+00:00

I have a signed applet and I want to write out dll files which

  • 0

I have a signed applet and I want to write out dll files which are contained in the jar from which I launch my applet.

I am doing this because I then want to do a System.load on the dll’s, as apparently you can’t load DLL’s from inside a jar in an applet.

The second issue is if you can add to the environment variables in an applet – for example I want to extract my DLL’s to a location the hard drive and add the environment variable so System.load can find it.

  • 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-21T03:08:43+00:00Added an answer on May 21, 2026 at 3:08 am

    You should be able to accomplish this by:

    1. Extracting the .dll from the applet jar into the system temporary directory.
    2. Calling System.load(..) on the extracted file with AccessController.

    This approach would avoid the need to set an environment variable. Here’s some example code:

    AccessController.doPrivileged(new PrivilegedAction<Void>() {
        public Void run() {
            String dllName = "my.dll";
            File tmpDir = new File(System.getProperty("java.io.tmpdir"));
            File tmpFile = new File(tmpDir, dllName);
    
            try {
                InputStream in = getClass().getResourceAsStream(dllName);
                OutputStream out = new FileOutputStream(tmpFile);
    
                byte[] buf = new byte[8192];
                int len;
                while ((len = in.read(buf)) != -1) {
                    out.write(buf, 0, len);
                }
    
                in.close();
                out.close();
    
                System.load(tmpFile.getAbsolutePath());
    
            } catch (Exception e) {
                // deal with exception
            }
    
            return null;
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: THIS IS A SIGNED APPLET So, I have an applet, which during initialization,
I have signed every jar required by the application but when trying to launch,
I have two signed Jars, a.jar and b.jar. a.jar is launched as an applet
I have applet embedded in http page. Applet is signed (as all jars which
I have a Java Applet which is digitally signed. I need to be able
All I have signed all the jar files including appletviewer.jar also . i am
In my signed applet I have an Image object, Now I want to save
I have jar file which is signed on my local machine. Its working fine
I have a signed Java applet. And it works fine. But now I have
Hi I have created a Self Signed Applet , but not able to access

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.