Why is jar packaging needed to access package visibility members?

javax.swing.text.html.HTMLDocument has (default) package access level members (eg base).
Simply creating a class in the javax.swing.text.html package does not give me access to the package members of HTMLDocument.
However, if I jar my class with the rt.jar, then it can access the package members of HTMLDocument.
Why is this?
And more importantly, is there another way around this?.. Can I jar my classes in a separate jar file?
-Kane

more info on this problem:
It seems that a different classloader is used for the classes in the jdk than standard user classes. Classes in the jdk are loaded by the bootstrap class loader. So user classes that "pretend" to be part of that package are not recognized unless they are actually a part of the rt.jar file.
hack solution: use the SystemClassLoader to load those user classes.
ClassLoader loader = ClassLoader.getSystemClassLoader();
loader.loadClass("myWannaBeSystemClass");
Still looking for more elegant solution...
but hopefully this will hold me over

Similar Messages

  • Accessing EJB from Swing - Why vendor jars are needed?

    Hi,
    I want to develop a small, Swing desktop application that connects to the appserver running on my computer.
    My question is that why must I add the appserver's jars for my client? For example as can be seen here:
    http://srikanthtechnologies.com/articles/j2ee/ejb3fromswing.html
    "Add the following libraries (.jar files) to SwingClient project. [...] jboss-ejb3-client.jar, jboss-aop-jdk50-client.jar, jboss-aspect-jdk50-client.jar and jbossall-client.jar - all these .jar files are found in client folder of JBoss installation directory( For ex, d:\jboss)"
    I thought that all I need to add is the standard JEE jars that contains the standard interfaces and classes.
    And how can I develop a vendor independent desktop client?
    Thank you for the help!

    Kumite wrote:
    Thanks,
    But why can't I just use the standard interfaces and invoke the appserver through RMI or anything else. You need an implementation not an interface to access objects in JBoss' JNDI tree.
    Another option is to provide webservice endpoints. Then even non Java clients can access the EJBs.
    Why must my client code look up the JNDI, why can't the appserver do this and return my client the reference of the wanted objects?That is what the appserver is doing when you provide those jars.
    >
    And how can someone develop a vendor independent client?Keep all the vendor specific stuff in property files.

  • Keychain - why does every program want to access it?

    After I set-up MobileMe on my new Mac Mini, every program is now asking for access to the keychain? Whether I approve or deny does not seem to make a difference. Why is this happening now since installing MobileMe and why do the programs need to access it each time? Is there any way to disable this or grant approval so I don't get bombarded by window pop-ups each time a program is started?

    Can you give some examples of every program please. Applications such as email, IM etc use it to store passwords and usernames so that's normal. Are there abnormal programs requesting access?

  • Flash Access Packager with Bridges to Rhozet Carbon (Win) and Telestream Episode Pro (OSX)

    Hi guys,
    i develope in the last month a full automate packager for flash access 2.0, written in AIR.
    I used AIR for the GUI and native process for communication with the jar fp access packager.
    I was impressed how fast i can develope a GUI for our customer with the latest flash builder. The hard work was to communicate with encoders like rhozet carbon coder on windows and episode on OSX.
    I first thought that i need about 2 days for a stable watch folder function, but if you want toDo a stable watch folder with error and retry managment it can steal  you maybe more then 2 weeks of your lifetime for developing.
    anyway, i record 2 tutorials and i would like to share how to build your DRM pipelines with other encoders or media assets management. The very interesting part is that it seems to possible to pack h.264 encrypted content into .flv. I think some of you know what this means. I got some examples ready, but need to proof more the flv specs if we transmux everyting right.
    Flash Access 2.0 with Rhozet Carbon Coder 3.18
    http://www.youtube.com/watch?v=69tY3059RYQ
    Flash Access 2.0 with Episode Pro 6.1.xx for OSX
    http://www.youtube.com/watch?v=5GILbP7oFOM (audio is broken for some reasons)
    Let me know what you think about this and if you want to talk about technical things or if you need help with FA lets start a disscusion here.
    Have a nice weekend.
    Gary
    http://onlinelib.de

    Hi guys,
    i develope in the last month a full automate packager for flash access 2.0, written in AIR.
    I used AIR for the GUI and native process for communication with the jar fp access packager.
    I was impressed how fast i can develope a GUI for our customer with the latest flash builder. The hard work was to communicate with encoders like rhozet carbon coder on windows and episode on OSX.
    I first thought that i need about 2 days for a stable watch folder function, but if you want toDo a stable watch folder with error and retry managment it can steal  you maybe more then 2 weeks of your lifetime for developing.
    anyway, i record 2 tutorials and i would like to share how to build your DRM pipelines with other encoders or media assets management. The very interesting part is that it seems to possible to pack h.264 encrypted content into .flv. I think some of you know what this means. I got some examples ready, but need to proof more the flv specs if we transmux everyting right.
    Flash Access 2.0 with Rhozet Carbon Coder 3.18
    http://www.youtube.com/watch?v=69tY3059RYQ
    Flash Access 2.0 with Episode Pro 6.1.xx for OSX
    http://www.youtube.com/watch?v=5GILbP7oFOM (audio is broken for some reasons)
    Let me know what you think about this and if you want to talk about technical things or if you need help with FA lets start a disscusion here.
    Have a nice weekend.
    Gary
    http://onlinelib.de

  • Packages and Use Access in Proxy development

    Hi everybody.
    I am desperately trying to generate an ABAP Proxy on my XI System. According to my documentation I should start by creating a new package and declaring a Use Access to the package interface SAI_PROXY_PIF.
    However, everytime I try to do this, I get the error message  "Package interface SAI_PROXY_PUBLIC_PIF points to a package that is too deeply nested".
    Ok. So I create another package, include my first package in this package and try to declare a Use Access to package interface SAI_TOOLS_PIF, in order to mimic the package hierarchy in the SAI proxy runtime. But I get the same error message there...
    Unfortunately I am not familiar with the new 6.40 package concept and Use Access relationships. Could somebody please explain to me what I am doing wrong?
    Thanks in advance,
    Joerg

    hi,
    you need SAI_TOOLS in the user access tab
    for your package that's all
    this is the documentaion:
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/content.htm
    Regards,
    michal

  • Forms 9i accessing package variables

    I created a package in my sql session which contains only variables. When I connect to the database through Oracle Forms and try to access these variables in a trigger I receive the error "Cannot directly access remote package variables or cursor" How can I access these variables from within a forms module?

    You cannot access package variable or constants directly from a remote PL/SQL client. Only PL/SQL running on the server can access these. You need to implement get and set methods in the package.

  • Help! Does the Motorola Rival now need a data package- being told it does by cust. service

    Last week I called Verizon and confirmed that I could activate a Rival on a prepay acct, so I purchased one for my dd and did it. My dh liked the phone and wanted one for himself so I purchased another one. I was just trying to activate it and with his current Verizon pre-pay number and the customer service rep is saying that it can't be activated on pre-pay because it needs a data package. I tell her that I have already confirmed that it did not need the data pkg, and that my dd is using a Rival on pre-pay as we speak so she tries to manually program it and it wouldn't work. She told me to call tele-sales since they activated my dd's phone, but when I call them they say only customer service can change an ESN (or whatever its called).
    Does anyone know whats going on?  

    Solved my own problem. My acct only had $6 left so I added money and then it worked. I'm not sure why the rep told me it needed a data plan.

  • Cffuntion access="package": bug?

    If I have a CFC function with access="package" why can it be
    called from a CFML page? Shouldn't this be restricted access that
    extends or invoked from another CFC in that directory?
    Thanks,
    Zeus

    Your code works for me, though I had to add a string arg to
    your sayHello function call and I had to make the function static
    in the class, as you are calling it without an instance.

  • HT201250 What is Airport Utility and why do I need to access this in order to backup my iMac using Time Machine...PLEASE??

    What is Airport Utility and why do I need to access Airport witeless devices in order to backup my iMac using Time Machine...HELP!!! PLEASE??

    AirPort Utility is required to configure an Apple AirPort Base Station or Time Capsule.
    Time Machine can use a Time Capsule or a locally connected volume. You only need to use AirPort Utility if you are using a Time Capsule.

  • ITunes won't upgrade to10.5. Error message "There is a problem with the Windows installer package. Contact the package vendor". I need help.

    iTunes won't upgrade to10.5. I'm on 10.1.17.
    When installing 10.5 it terminates with an error message "There is a problem with the Windows  installer package. Contact the package vendor".
    It does not provide an error code or details/description to further troubleshoot. As a result I can't upgrade my Apple devices to leverage the cloud.
    Any smarts out there who could help?
    Using PC Win-7 w/IE 7 (should that matter)
    Thanks much

    I know there's a million threads like this, but I thought I'd record my experience.  I, too, was having the original poster's error when I tried to update iTunes on Windows XP.  I think I was stuck on 10. 
    I solved it by un-installing iTunes and every other Apple app.  I discovered that Apple Software Update would not un-install as its MSI file could not be found.  I used the "Windows Install Cleanup" tool from Microsoft to remove Apple Software Update from the list of installed programs.  Google "kb290301" for a Microsoft page that includes a download link for it.  After that, I was able to install a fresh copy of iTunes 10.5.2.
    I'm not sure why this app's folder and MSI were missing from my computer.  I had once used Laplink PC Mover to move everything from my old computer to this one, and perhaps it missed a bit.

  • I don't need the full package. Is there an easy way to change from the full to photographer's package?

    I'm trying to save money and realize that I don't need the full package. I wanted to just change over to photographer's pack with just Lightroom and Photoshop but I seem to be missing the way to do that through my account. Is there an easier way?

    http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html

  • Not  able to access default package classes in own package

    I created a class called Constant.java in default package(no package ).
    I have Connection.java in util package.
    I am trying to use the Constant.java in my Connection.java like below..
    public class Constant
         public static final String NEW = "01";
    package util;
    import Constant;
    public class Connection
    I am unable to compile the class Connection. My question here is Won't I able to access default package in my util package.. ?

    java_guy04 wrote:
    Djaunl , I understand.
    but, Will I able to access default package in my util package.. ? is this correct.No, you won't be able to use classes out of the "default" package.
    Because, AFAIK, if you use a classname that you haven't imported, Java automatically attempts to locate this class in the same package as the current class. It does not check the "default" package (unless that is also the current package), and since the "default" package does not have a package name, you can't import those classes either.

  • Where is the .jar file that contain this package oracle.security.idm

    Dear Everybody
    Could you tell me where is the .jar file that contain this package
    oracle.security.idm
    Thanks for your help

    Hi,
    check jdeveloper_home\jdeveloper_10133_<version>\jlib\identitystore.jar
    Frank

  • My outlook will not open yet all other microsoft packages will.  When I click on the icon, the 'o' logo will come up for a split second but will not open the package - need to receive emails asap!

    My outlook will not open yet all other microsoft packages will.  When I click on the icon, the 'o' logo will come up for a split second but will not open the package - need to receive emails asap!

    You're very welcome!
    I meant holding the "option" (or "alt") key on your keyboard as you click the Outlook icon on the Dock, and continuing to hold it until you see the Microsoft Database Utility come up. Alternatively, you can open the utility by navigating to Applications/Microsoft Office 2011/Office and then double-clicking the Microsoft Database Utility app.
    When you rebuild your database using that program, a backup copy of your original database (containing your account info, contacts, mail, calendars, etc) will be created. As a security precaution, you should also ensure you have a backup of your database (which you can find by going to Documents/Microsoft User Data/Office 2011 Identities/ and copying the contents of that folder onto an external drive).

  • Why do we need write access to Java installation Directory

    We are Upgrading from Siebel Analytics 7.8 to OBIEE 10.1.3.4.
    As OBIEE needs Java 1.5 or higher as a pre-requisite we are planning to uninstall Java 1.4 and install latest version of Java 1.5.
    According to OBI Installation and Configuration Guide http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31765.pdf -> Page 39 "If you are installing using the Basic installation type, make the user or user group permissions
    writable for the user installing Oracle Business Intelligence, for all JDK 1.5.0 installation directories,
    subdirectories, and files". Can anybody let me know why we need write access to Java Installation Directory??
    Thanks,
    Chandra
    Edited by: user6086408 on Apr 5, 2010 3:07 PM

    I had this same question and asked Oracle. Here's what I was told:
    Per Dev:
    "For OBI Presentation Services and OBI Publisher, jdk fonts files are copied into the JDK location because we do not bundle our own JDK. To ensure the install can do this you need to ensure that the Oracle BI installer has permissions to copy files to the specified JDK location.
    This means that if the same user who installer/untarred JDK is also installing Oracle BI, the install should work. In this case the the permissions of the JDK is probably 755.
    It will not work if a root user installs JDK and a normal user installs Oracle BI because the normal user does not have access to write to the JDK location or will not work if the JDK location is read-only, i.e. 444. In this case running chmod -R 777 will work."
    Jerry

Maybe you are looking for

  • OAM 11g is supporting direct integration with E Business ??

    Hi All, Is OAM 11g supporting Direct integration with E Business suite instead of going through the OSSO ?? Please give me some pointers how to do the OAM 11g and E Business suite integration. Thanks & Regards, Vaasu.

  • HTML Tag in OBIEE 10.1.3.2.1

    How to add a HTML Tag in OBIEE 10.1.3.2.1? In Dashboard object we are not getting any HTML option in this version. In 10.1.3.4 we are getting the HTML check box in the 'Text' dashboard object. Please suggest how to add HTML tag in 10.1.3.2.1. Actuall

  • Utilities Retail - Customer Services

    I am beginning a business case about Financial and Process Improvements by using SAP CRM to Manage Utilities Customer Field Services (Connections and Disconnections, maintenance, Help Desk, etc). I am looking for bechmarks in this area. If you know s

  • Tomcat / MySQL problem

    Simple Tomcat / MySQL code works well on the development server (Windows) but crashes on the production server (Linux). It finds and loads the driver, then fails to create a connection with java.security.AccessControlException: access denied (java.ne

  • Help! jbuttons not visible

    In a block of code for a class, i and trying to use the paint method to draw on a panel, and i have buttons on the jframe for other purposes. For some reason, the buttons don't appear until i move my mouse over them. Does anyone have any suggestions