Bug in Applet properties.

I have found what seems like a bug in the JDK1.6+ getProperties when running as an Applet
java_home property returned as an application.
E:\Program Files\Java\jre1.6.0_02
But as an Applet it is Wrong...
E:\PROGRA~1\Java\JRE16~2.0_0
If you rely on this for a File object and assume it is correct you will be throwing unexpected exceptions.
(Bug report to Sun on way)
(T)

I have found what seems like a bug in the JDK1.6+
getProperties when running as an Applet
java_home property returned as an application.
E:\Program Files\Java\jre1.6.0_02
But as an Applet it is Wrong...
E:\PROGRA~1\Java\JRE16~2.0_0
If you rely on this for a File object and assume it
is correct you will be throwing unexpected
exceptions.
(Bug report to Sun on way)
This has been verified as a bug and entered into the bug database as
bug # 6598471.
(T)

Similar Messages

  • Bug: Java applet cannot print, even with print permission granted.

    I was not able to file this bug report at the official Apple bug report site, so...
    Summary:
    When a java applet initiates a print job, the user is (correctly) presented with a dialog requesting permission for printing. Once permission is granted, the printing subsystem attempts to communicate with CUPS at localhost:631, and permission is denied. To the naive user, it appears that the applet is broken.
    Steps to Reproduce:
    Go to
    http://www.wordle.net/gallery/wrdl/921427/WordleCore_SourceCode
    Once the applet has loaded, click the button labelled "Print...".
    Expected Results:
    After permitting printing, the user should see the print dialog, and printing should proceed as normal.
    Actual Results:
    Here is the relevant section of the stack trace generated when this happens:
    <pre>java.security.AccessControlException: access denied
    (java.net.SocketPermission localhost:631 connect,resolve)
    at java.security.AccessControlContext.checkPermission
    (AccessControlContext.java:264)
    at java.security.AccessController.checkPermission
    (AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:
    532)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:521)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
    at sun.net.www.http.HttpClient.New(HttpClient.java:304)
    at sun.net.www.http.HttpClient.New(HttpClient.java:321)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
    (HttpURLConnection.java:813)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect
    (HttpURLConnection.java:765)
    at sun.net.www.protocol.http.HttpURLConnection.connect
    (HttpURLConnection.java:690)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream
    (HttpURLConnection.java:857)
    at sun.print.IPPPrintService.opGetAttributes(IPPPrintService.java:
    1419) </pre>
    Regression:
    This problem was introduced only with the most recent Java update.
    Notes:
    There is no workaround for the applet author, other than to use a signed applet, which is prohibitively expensive, and which should not be required for printing, anyway. It's difficult to instruct the user in how to grant the appropriate permissions via policy files, since the finder will not allow a user to create a file named ".java.policy" in their home directory, and since the system policy file is write-protected.

    Jonathan Feinberg wrote:
    I was not able to file a bug report
    You should file a bug report with Apple at http://bugreport.apple.com if you have a developer account or at http://www.apple.com/feedback/macosx.html if you do not have a developer account.
    Good luck w/your issue and please update this thread if you encounter a solution.

  • Static variable, a bug in applet classloader, Java plug-in?

    I found a potential bug in java plug-in.
    Environment,
    1. IE 6.0
    2. Windows XP
    3. JRE 1.3.1.06 and JRE 1.4.1.01
    Steps,
    1. build a very simple applet (attached below)
    2. embed the applet into a .html page.
    3. enable java plug-in for IE and Netscape.
    4. launch the .html page in either of the two browsers.
    5. for the 1st time, I can see 'tmp = 0' in the java console window.
    6. keep the browser open, browse to 'www.google.com'
    7. click 'Back' button of the browser.
    8. I notice 'tmp = 1' in the java console window.
    9. if I browse to google.com and back again, it will display 'tmp = 2'. and the number will keep on increasing if I repeat those steps.
    10. But if I press F5 to refresh the page, the log message will go back to 'tmp = 0'. and if I press 'x' inthe console window to clean up the classloader cache, I will get 'tmp = 0'. If I close the browser and open a new one, I will still get 'tmp = 0', which is what the applet should output.
    11. If I click 't' in the console window to list the thread while I am in the 'google' page, I can't see the applet thread, which means the applet should have been destroyed.
    12. No matter I try 'g' to do garbage collect, or 'f' to finalize objects, the problem still happens. the only solution is what I did in the step 10.
    Is it a bug in the classloader or the JRE itself? Why the value of the static variable won't be cleaned up along with the applet?
    ----------- HERE IS THE APPLET --------------------
    import java.applet.Applet;
    public class AA extends Applet
    private static long tmp = 0;
    public void init() {
         System.out.println("tmp value = " + tmp);
    tmp++;
    public void start() {}
    public void stop() {}
    public void destroy() {}

    Static values are stored in the class. Once a class is loaded into a classloader, it cannot be unloaded (the only thing you can do is use another classloader).
    Apparently, the classloader cache allows sharing of classloaders between applet instances. Perhaps F5 (reload) causes the classloader cache to be cleared.
    I don't see any bug. When developing applications or applets that must run in the same JVM, you should program defensively and avoid using static values which can change over time.

  • Bug in the properties field in Creator 2

    If I drag a component (lets say a text field) to the page and click on the text-field next to the Text property I am able to write the binding directly in EL there. But If I want to modify it later on, it pops up the dialog instead of letting me edit the binding in-line.
    There is also a bug in the Property Bindings dialog (or at least I think it is a bug) If I try to bind the readOnly property to a boolean value stored in my session bean and try to negate it, the dialog just removes the !. I then have to move to the jsp view and insert it there again. (the EL looks like:
    #{!SessionBean1.booleanBean}
    It works as expected.
    But if I then try to click on the property binding, the dialog opens with an empty current property setting.
    (This bug really makes me miss the posibility to edit the property inline in the text-field ;))
    Trond

    Thanks for sharing this. I have logged bug: 6434531
    Lark

  • Bug? Reference properties are not mapped to UserInfo settings

    Is this known? If an object property is of reference type, and is declared as searchable, and is assigned to a user object, and is mapped in the User Profile Manager - Property Map page, it's still not available for LookupUserInfoSettings().
    Example. In my OnAfterLogin PEI I'm trying to read user's setting as in:
    stringmyCommunity = (string) ptSession.GetUserInfo().LookupUserInfoSettings("MyCommunity")[1][0];
    The "MyCommunity" UserInfo setting is mapped to MyCommunity object property. The MyCommunity property is a reference to a community and it is searchable. Yet, LookupUserInfoSettings returns null. It works well for non-reference properties, however. Am I missing something?
    Ruslan.

    Hi,
    Good afternoon and greetings,
    Please go through the following SAP OSS note
    Note 376531 - MIRO: Field ZUONR is not ready for input
    Please reward points if found useful
    Thanking you
    With kindest regards
    Ramesh Padmanabhan

  • 3D Plot Properties Axis Format Property update bug

    Tested in LV 2011, Windows XP.
    If you try to change an axis format property (say Digits of Precision) and switch to another axis using the pull-down list box, the property is not updated, even though it is also not applied to the new axis.
    In other words: the default precision is 2 and I want to change it to 1 for the X and Y axes.
    I select the X axis, change the Digits value to 1. This applies it to axis 1. Good.
    I now select the Y axis: the Digits value does NOT change (it stays 1) but the Y axis precision does NOT change either (it stays 2). Not good.
    You have to actually edit the Digits field an press enter to update the value ON THE GRAPH.
    There might be some similar bugs in other properties.

    Hi X.!
    Thanks for posting your find. I would love to take a look at this behavior. There are multiple 3D graph property dialogs depending on your implementation. I've looked at three examples and they each have a slightly different menu options under format properties. Can you point to or post an example that duplicates the behavior?
    Best Regards,
    Andrew S
    Application Engineering Specialist
    National Instruments

  • Using applets in forms 9i

    i am trying to use an "normal" applet (myapplet) designed for use in a html-page
    in forms9i.
    properties in applet can be set as "<param name="image1" value="1.jpg">...
    i used jdevloper to create a wrapper-bean:
    new->beans->Oracle Forms Pluggable Java Component
    extends: oracle.jdeveloper.pjc.BeanWrapper
    optional attributes: bean: myapplet.
    then i tried to define the property ids like:
    private final static ID image1 = ID.registerProperty("image1");
    what next? any howto's??? the pjc-demo from otn does not exactly describe, how to make a wrapper bean...
    kind regards

    Close - but you don't need the .class extension.
    1) Copy the Clock.class into your forms90/java directory (or you can have it in a JAR and point to in the various Archive Tags - but let's just copy the class for the moment)
    Then the code you need in your When-New-Form-Instance is something like:
    FBEAN.REGISTER_BEAN ('BLOCK1.CLOCKAREA',1,'Clock');
    That should create the clock in the bean area (I've just tried the Java 1.4 Clock and it works)
    The calls to FBean.SET_PROPERTY() are not going to be the way to set applet properties on the Clock. FBean.set_property is for setting the values of public variables on the bean (if it has any and this one does not).
    Setting the Applet properties is done like the forms applet properties themselves. So you need to update the template HTML file - in this case basejini.htm and add in the properties that this Applet uses to the ones the Forms Applet uses -
    e.g. I added <PARAM NAME="bgcolor" value="FF0000"> to my basejini to set the background of the clock to Red.
    The only thing you won't be able to change in this way is the Width and height. The size of the Bean Area effectively becomes the Applet Area in that case.

  • Problems with jumping ball in Java applet

    The ball is supposed to jump to the same height from which it fell down, someway it always gets higher and higher. My question is why?
    import java.applet.*;
    import java.awt.*;
    public class Bug extends Applet implements Runnable
       private int y_pos = 200;
       private int y_speed = 0;
       private int radius = 20;
       private int appletSize_x = 400;
       private int appletSize_y = 400;
       private Image dbImage;
       private Graphics dbg;
       public void run(){
           while(true){
               y_speed++;
               if ((y_pos > appletSize_y)&& (y_speed > 0))
                    y_speed = (-1)*(y_speed);
               y_pos += y_speed; 
               repaint();
               //controls the time
               try{
                   Thread.sleep(20);
              catch (InterruptedException ex){}
        public void update (Graphics g){
            if (dbImage == null)
                dbImage = createImage (this.getSize().width, this.getSize().height);
                dbg = dbImage.getGraphics ();
            dbg.setColor (getBackground ());
            dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);//erase this line to understand better
            dbg.setColor(getForeground());
            paint(dbg);
            g.drawImage (dbImage, 0, 0, this);
        public void stop(){}
        public void destroy(){}
        public void start(){
            Thread th = new Thread(this);
            th.start();
        public void paint(Graphics g){
         g.setColor(Color.green);
         g.fillOval (30 - radius, y_pos - radius, 2 * radius, 2 * radius);
    }

    Shurik007.5 wrote:
    The ball is supposed to jump to the same height from which it fell down, someway it always gets higher and higher. My question is why?
    g.fillOval (30 - radius, y_pos - radius, 2 * radius, 2 * radius);There are variables here involved in what gets drawn, no? And do (some of) these variables change during the lifetime? Yes. So, there should be no question about why the display changes.
    Edit: I guess your question is more about "why doesn't y_pos keep cycling back and forth between the same two values?" I'd suggest you do some debugging, to make the computer tell you what the values are at each step until you understand what is going on. The simple answer is "It did what you told (programmed) it to do", of course.

  • Security Bug in weblogic.httpd.enable

     

    Hi!
    When I set this "weblogic.httpd.enable=false". I will get UnmarshalException
    for WLStub at ejb client whenever I update my classes. Is this by design?
    When I comment out this, the error is gone.
    Regards
    Yew Yap
    "Vince" <[email protected]> wrote in message
    news:87f5ng$g7g$[email protected]..
    Hi all,
    I don't know whether you all know this or not, but I would feel guilty ifI
    didn't tell all of you. I found a bug in the properties file. WebLogic
    claimed that the httpd can be disabled for security purposes. However, I
    realized that no matter what boolean you assign to weblogic.httpd.enable,
    the httpd is still alive. The setting in the properties file has noeffect
    at all. For those of you who have to disable httpd for the security ofyour
    internal networks, this is really a problem. I have reported this to BEA
    and will see how they fix this. You can test this on your WebLogic server
    by setting the property to false and test to see if the clients canconnect
    to your server using http. I was be able to use a browser to connect tothe
    server and even more I could replace t3 with http in my java code toconnect
    to my EJBs after I disabled httpd.
    Vince

  • Bug? Format choices sometimes don't agree with the data type

    I discovered (while experimenting) what seems to be a small bug when editing properties of numerics:
    Unless the number is in an integer representation, the special integer formats (Decimal, hex, octal, binary) are greyed out.
    So let's start out with a DBL numeric control and open the properties window. We can change the representation on the "data type" tab of the properties dialog to an integer (e.g. I32), and the control immediately changes color accordingly. However, if we go back to the formatting tab, the integer specific formats are still greyed out. They should now be accessible!
    Only after exiting the properties dialog and opening it again, the correct format are no longer greyed and can now be selected.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    GreyedFormats.png ‏33 KB

    Thank you for bringing this to our attention. We will be notifying our Research and Development group as was this was a previous CAR that was believed to have been fixed in 2011.
    -Jake B.

  • PDA is under the environment of Jeode, carry out applet question with swing

    Purpose : Under the environment of Jeode in PDA, links APPLET webpage on websites, and APPLET is " import javax.swing. *".
    Question: Not knowing the problem of how to go to solve swing bug of applet , it is unable to read webpages to cause pda.

    Right. Make "number" a field, and take it out of the
    method signature for paint.
    Because you didn't use the same signature, you didn't
    override the existing paint(Graphics) method, you
    just overloaded it. That means that when the GUI
    thread tries to make your applet paint itself, it
    calls the original paint(Graphics) method, and not
    your paint(Graphics, int) method -- and so your
    method never gets called.
    Hi Paul,
    Not to sure whether is this what you mean by above statement, i just understand the statement in bold, anyway i ammend the program , this time i declare another variable outside the init() and paint() call int num
    import java.awt.*;
    import javax.swing.*;
    public class Draw extends JApplet
        int num;
        public void init()
        \\ask user for input (1, 2 or 3) = String numberStr
        num = Integer.parseInt(numberStr)
        public void paint(Graphics page)
            for (int index = 0; index < 100; index++)
            switch (num)
            \\ my statement code
    }Anyway it works, thanks..:)
    my last assigment before my exam.

  • How i get hardware info with Java Applet

    Hello Everybody.
    first I am sorry for my english. This my first topic. I am a php developer and learning Java. I am developing a Java Applet.
    Can i get client hardware info with Java Applet
    Ýf i can How i do get hardware info with Java Applet.
    I need sample code or documentation.
    Thanx.

    TrojanMyth wrote:
    Hello;
    Can i get hardware info with Java ?? Have not a know people ?Applets are restricted, unless, as already noted, they are signed and accepted by the user. See
    http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
    http://java.sun.com/docs/books/tutorial/deployment/applet/properties.html
    In general, since Java is designed to run on multiple operating systems and machine architectures it does not provide much access to the underlying hardware. As mentioned, you can access the os via methods in the java.lang.ProcessBuilder and Runtime classes.

  • Sometimes "target applet or jvm process exited abruptly" liveconnect

    I have a problem with a applet with is embedded in my webpage ans which I am using to setup a socket connection to a server. I am communicating from the webpage to the applet with live connect to send data, and from the applet to the page with live connect for the received data.
    This works fine most of the time, but occasionaly at the customers site i get the error:
    "target applet or jvm process exited abruptly"
    which seems to indicate the JVM has crashed. I searched the client for hs_err* files but did not find them. The client is running the latest JRE 1.7_05
    Does anyone have any ideas how to find the root cause of this problem ?
    Kind regards,
    Marco

    Enable full tracing and see what is happening with applet around the time you get this message. See also other troubleshooting hints in
    http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html
    May be browser "reloads" page and reinstantiate the applet or it could be bug in applet or Java platform.

  • Jboss & signed applet

    Hi.
    I'm trying to connect to jboss from an applet:
    Properties jndiProps = new Properties();
    String myServer = this.getCodeBase().getHost ();
    jndiProps.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory" );
    jndiProps.setProperty("java.naming.provider.url", myServer) ;
    jndiProps.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces") ;
    I signed the applet as described in http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/rsa_signing.html
    but without importing certificate, i.e. i get "selfsigned" applet.
    When i acces this applet with browser it shows me a confirmation dialog, i choose "Always allow".
    But it still cant't connect to server throwing
    ava.security.AccessControlException: access denied (java.lang.RuntimePermission org.jboss.security.SecurityAssociation.getPrincipalInfo)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
    at java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
    at org.jboss.security.SecurityAssociation.getPrincipal(SecurityAssociation.java:112)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:74)
    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
    at $Proxy2.create(Unknown Source)
    at lavka.applet.ItemsApplet.init(Unknown Source)
    at sun.applet.AppletPanel.run(AppletPanel.java:347)
    at java.lang.Thread.run(Thread.java:536)
    It works, when i put
    grant codeBase "http://www.mysite.com:8080/applets/-"{
    permission java.lang.RuntimePermission "org.jboss.security.SecurityAssociation.getPrincipalInfo";
    permission java.io.SerializablePermission "enableSubstitution";
    to .java.policy but it's impossible to force every user to do so.
    Any ideas?
    wbr, eugen.

    Hi,
    It looks like you've signed the applet but not the JBoss code. Java's access control mechanism runs the code with the lowest common privileges so you get an AccessControlException.
    To get around this, all you have to do is use the AccessController's doPrivileged() method. For example:
       init() {
            ...normal code here...
            AccessController.doPrivileged(new PrivilegedAction() {
                public Object run() {
                    // privileged code goes here
                    ...code to create JBoss proxy...
                    return null; // nothing to return
           ...normal code here...
      }There are a lot more details in the Javadoc for the AccessController class.
    Eimhin

  • Another seperateframe workaround?

    I'm working with seperateframe=true. I need the close the first browser window when the other window closes. I've seen the close html page but we have a lot of forms and some are modal, others are not, some are both. So trying to figure out when to call that close html page may be difficult. Plus it's one more thing we have to remember to do when creating new forms and a lot of our testing department's time will be spent verifying all the scenarios.
    I've been toying around with the applet properties and javascript. I suppose someone has already looked into this since it's not posted anywhere, but is there some property of the applet that I can poll on occasion (maybe every 2 seconds or so) to see if the applet is done.
    I placed a button on my basehtml page that fires off this alert (aApplet is retrieved using getElementById(...) and passed off to this method).
    function alertApplet(aApplet){
            alert("active    = " + aApplet.isActive()+ "\n" +
                  "doc base  = " + aApplet.getDocumentBase() + "\n" +
                  "locale    = " + aApplet.getLocale() + "\n" +
                  "accesskey = " + aApplet.accesskey + "\n" +
                  "code base = " + aApplet.getCodeBase() + "\n\n"+
                  aApplet.getAppletInfo());          
        }but none of the properties change, even after i call aApplet.destroy() except isActive() which changes all the time and isn't what I need but I was hoping it might go to null when the applet was done.
    My other thought was that there might be a way to find when the Forms Developer Runtime window closes by watching the processes on the client or something like that.
    Another thought was that the other window would be some kind of child of the first browser window and there might be a way to find out when it has died.
    Lastly, if by chance I did determine which forms needed to call the close html file, could I automate the editing of the form using that Java API thingie for forms? Don't really need to know how, I can find that out later, just wondering if it was possible.
    It seems that Oracle could have provided an event or a method that the Applet could have called when it was unloading so that it could be caught in the javascript and handled much more easily than this. I have very little js/applet experience but everything I've read tells me this could work. Is it something that could be brought to Oracle's attention so that it could be implemented in the future?
    Thanks for your time(this was a rather long winded post), any help is always appreciated even though I realize this is probably more philosophical than anything else.

    Just for closure. We support only Internet Explorer and Windows clients. This made this solution feasible for us but it probably won't work for most people. I thought I'd share none-the-less since this is such a sore point.
    We created a VB6 wrapper around Internet Explorer. This wrapper goes to the URL for the Oracle Forms application. The app never shows IE to the end user, just a special splash screen. Once the Forms app fully loads the vb6 app grabs the handle to the window, maximizes the "forms" window then hides itself. It then waits for the "forms" window to close so that it can close itself. This effectively nutrualizes the window containing the applet. It allows us to close the "applet" window w/o editing all of our umpteen hundred forms that you can exit the application from. It allows us to hide the "applet" window from the user so they don't accidently close it prematurely or have to deal with a useless window in thier task bar.
    I had to do a lot of tricky stuff to get this to work, and it does require an extra component that all the client machines have to have, but it is very light weight and doesn't require any installation on a default xp install.
    Another cool thing about doing things this way is that we now have a vb app that has direct control over the window that forms is running it. This gave us some cool advantages. We are now able to fully maximize the "forms" window when the application loads so that the status bar isn't missing from the bottom(there is some bug or something that when you use set_window_property and maximize, the status bar doesn't appear).
    Just thought I'd share my approach to the problem. Hit me up if you want any more information.

Maybe you are looking for

  • Just upgraded to iTunes 10.0.1 and some artwork is not displaying

    OK iTunes 10.0.1 IS NOT better than iTunes 10.0.0. The artwork for some songs/albums is there as seen in Get Info, but it is not displaying specifically in the Album column of the list/thumbnail combo display. The artwork does display in the thumbnai

  • How to get the index of a h:column element?

    Hi! I'd like to know how to get the index of a <h:column> element. Here is the code of what I'm trying to do: <h:column>      <a:commandLink           value="#{familyAction.familyDocsByPrj}"           action="#{homeAction.search(ROW_INDEX)}"         

  • LP to iTunes and CD

    I would like to convert about 50 old LP albums to digital music and then to iTunes and out to my iPod. My audio equipment is old and I would like to do this as a one-time project. My research says I need a turntbale, a phono pre-amp, and then some wa

  • How to .... create a hierarchical dimension in ODI?

    What are the steps to create a hierarchical dimension in ODI? For example: Employee dimension with 3 levels: L1, L2, L3 (will include SID, ID, ...) Any suggestions are appreciated !

  • Will XML Help?

    I am loading a nice amount of data onto a server from a db so that clients can have quick access to the info (we wont have to go back to the db to get their info). As the data is growing I am getting an Out Of Memory error. Do you think that if I sto