Announcement Announcement Module
No announcement yet.
Help About Dialog and images Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help About Dialog and images

    I have a problem displaying an image when I start application thru WebStart.

    So if I specify in about dialog's text <img src="image:about.main"> it will not display the image, only in the case where my application was started thur JWS. If I start it locally everything is working fine.

    Does anyone have an idea of what is wrong here?

  • #2
    Do the other images in your application work properly?

    I ask because I deploy my application using JWS and all the images work fine. I do not, however, use the RCP supplied about box, so maybe it's a problem just with that component.



    • #3
      yes all other images are fine.

      I am quie sure it is something to do with images: prefix, if I put the image on web server and specify works fine.

      The thing is AboutBox uses HtmlPane which in turn extends JTextPane which in turn uses javax.swing.text.html.HTMLEditorKit and I am pretty sure there has to be some thing to tweak there. I just do not know what :-)

      Anyone has any idea?


      • #4
        Are you by chance specifying a value for java.protocol.handler.pkgs anywhere in your application?

        It appears that there is a subtle bug in the installImageUrlHandler method. It is doing a comparison like this: if (packagePrefixList != "")

        Now, this won't actually compare against an empty string, it will pretty much always evaluate to true. This by itself shouldn't cause a problem as it would force the addition of the org.springframework.richclient package to the list. It will potentially create a bogus list since if the current property value is null, then you would end up with a new property value of "null|org.springframework.richclient".

        I don't see how this would break anything directly, but it is certainly wrong.

        Have you debugged down through the openConnection method in the image Handler class? That would be the determining factor. Unfortunately, I don't have a good testbed for this at the moment, so I can't reproduce your problem.

        Last edited by lstreepy; Nov 29th, 2005, 01:21 PM.


        • #5
          Ok, I've done a bit more digging on this and as best as I can tell, for some reason, the custom image protocol handler is not being used by the URLStreamHandlerFactory when JWS is used to start the application.

          I know that this just confirms what you already knew, but I think it narrows the problem scope. I don't know a lot about JWS, so I don't know what it might be doing that would screw up the normal discovery of custom protocol handlers.

          Not much help, but maybe a someone else knows more about JWS?

          EDIT: Short answer - it's busted

          Check out this link to read a bug report on the JDK regarding this problem:

          Last edited by lstreepy; Nov 29th, 2005, 03:47 PM.


          • #6
            thanks Larry,

            I will try to dig into this later on this week. I just was not sure if it is SWING related or something else. As I am not familiar with SWING much, I was hoping it is SWING related, so I have a good excuse not to dig :-); but it does not smell like it ...


            • #7
              It isn't a problem with either RCP or Swing - It's a problem in the core java libraries. If that matters