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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:05:33+00:00 2026-05-26T16:05:33+00:00

I am creating a new Widget using the same structure/style as the other Swing

  • 0

I am creating a new Widget using the same structure/style as the other Swing widgets. To this end I have put my UI class in javax.swing.plaf.basic. As part of my UI implementation I am using the javax.swing.plaf.basic.LazyActionMap class. Eclipse is considering it to be visible as it has the same package name, however at runtime I get a java.lang.IllegalAccessError exception (presumably it is not visible at runtime).

It seem that even though I have given my class the same package name, and Eclipse is considering them to be in the same package, at runtime they are not.

Is there something I am doing incorrectly? The reason I am trying to have visibility to internal library classes is because for the prototype of the widget I am re-using the JSlider UI code. In the future I will transition to drawing the slider from scratch.

  • 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-26T16:05:33+00:00Added an answer on May 26, 2026 at 4:05 pm

    Classes loaded through a different class loader are considered to belong to different packages. At compile time your compiler will not know how you are going to deploy, so can’t see the mistake. You could add the code as system classes with -Xbootclasspath/a:, but that’s very naughty and you shouldn’t do it.

    You should put your own classes in your own packages, well outside of javax. java.* classes wont even get loaded by non-bootstrap class loaders.

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

Sidebar

Related Questions

I am creating a new ExtJS widget using Ext.view.View. The template for this view
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I'm creating new Site Definitions using this method: http://weblogs.asp.net/paulballard/archive/2007/04/09/creating-a-custom-sharepoint-2007-portal-site-definition-using-the-portalprovisioningprovider-class.aspx and when they get created,
My code for creating the data table looks like this: myDataTable = new YAHOO.widget.ScrollingDataTable(
I have 2 custom fields in my WordPress system when creating new posts. One
How can this be done more elegant and without creating new objects? List<Move> playerMoves
I have some conditional formatting styles. I don't want to keep creating new rules
I have such view that handles user registration. After creating new user i want
I'm creating a custom widget by extending LinearLayout : public class MyWidget extends LinearLayout
I am trying to create a calendar using the Gallery widget. I have a

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.