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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:28:27+00:00 2026-05-28T18:28:27+00:00

I have created an applet to read some info from a file on the

  • 0

I have created an applet to read some info from a file on the server. I try to access the file using the following code:

Properties Settings = new Properties();
settings.load(new URL(getDocumentBase(), "settings.ini")).openStream());

All of a sudden, the second line is giving me the error:

java.lang.NullPointerException
at java.applet.Applet.getDocumentBase(Unknown Source)

My applet is signed and I access it through my localhost.Why can’t I use getDocumentBase anymore?

Btw, I am using Netbeans Web Start option to create the necessary files (jars, html, jnlp) and then move them to my IIS local server.

SOLUTION

I’m loading the ini file from within the jar now:

Properties Settings = new Properties();
URL url = this.getClass().getResource("/myapplet/settings.ini");
settings.load(url.openStream());
  • 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-28T18:28:28+00:00Added an answer on May 28, 2026 at 6:28 pm

    SOLUTION

    I’m loading the ini file from within the jar now:

    Properties Settings = new Properties();
    URL url = this.getClass().getResource("/myapplet/settings.ini");
    settings.load(url.openStream());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a voice recorder applet. The output sound file will be .wav
Hi I have created a Self Signed Applet , but not able to access
I have created a C# class file by using a XSD-file as an input.
I have created simple Java class to test file writes from applets: update appeared
I have created an applet jar. That jar contains an images in the following
I have created a UITableViewCell using UITableViewCellStyleValue1, which the Apple docs define as: A
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a PHP-script to update a web server that is live inside
I have the following piece of code which uses the ALAssets library to store
I have created a Java software with a graphical interface using SWING. I have

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.