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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:48:12+00:00 2026-05-24T15:48:12+00:00

is it possible to use java.util.Logging and log to a file in a java

  • 0

is it possible to use java.util.Logging and log to a file in a java webstart application?
I have the following logging code:


 Handler fh = new FileHandler("myapp.log");
 Logger.getLogger(MyApp.class.getName()).addHandler(fh);

and got the following exception:


java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.util.logging.LogManager.checkAccess(Unknown Source)
    at java.util.logging.Handler.checkAccess(Unknown Source)
    at java.util.logging.FileHandler.(Unknown Source)
    at whoisapiclient.WhoisAPIClientApp.main(WhoisAPIClientApp.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

  • 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-24T15:48:13+00:00Added an answer on May 24, 2026 at 3:48 pm

    The access control exception says this:

    “access denied (java.util.logging.LoggingPermission control)”

    The javadoc for the permission class says this:

    “Currently there is only one named LoggingPermission. This is “control” and it grants the ability to control the logging configuration, for example by adding or removing Handlers, by adding or removing Filters, or by changing logging levels.“

    What you are doing clearly falls under the “control” permission.

    You will need to sign your application if it is to create/add its own log handlers.


    Incidentally, if you did manage to work around the LoggingPermission("control"), you would then run into another access issue in opening the log file.

    Both problems are solved by signing the application. You’ve then got the problem that the user has to accept / trust your signing key. But that is fair enough! As far as the Java security sandbox can tell, what you are doing could potentially damage the user’s machine.

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

Sidebar

Related Questions

Is it possible to configure java.util.logging to compress log files when it rolls onto
Possible Duplicate: How to reference another property in java.util.Properties? look at my file.properties: key1=
is it possible for me to use java library such as import java.io.File; import
Is it possible not to use Java EE Application client from Glassfish to access
Possible Duplicate: When to use “strictfp” keyword in java? What is the use of
I have recently started looking into Google Charts API for possible use within the
Is it possible to use an UnhandledException Handler in a Windows Service? Normally I
Take the following generics example import java.util.List; import java.util.ArrayList; public class GenericsTest { private
With the following source code: package util.abc; public class Test{ public String out(){ return
Possible Duplicate: ClassNotFoundException com.mysql.jdbc.Driver I have included the mysql-connector-java-5.1.16-bin.jar into my Eclipse library, this

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.