#11 Cannot run two java applets simultaneously

client (8)
Mark Patton

Various parameters in JIIPView.java and JIIPImage.java such as image name are static. This prevents an more than one instance of the applet from running at the same time.
(All instances will use the parameters of the last instantiation.)

The fix is easy, just make those parameters instance variables. A few methods will need to have static removed as well.


  • Denis Pitzalis

    Denis Pitzalis - 2007-10-05

    Logged In: YES
    Originator: NO

    Thanks Mark for you suggestion!
    I'm now concentrating my effort on the flex client and I was thinking to go back to the java version only if somebody will help me to clean the code :D.
    The problem about the static variable name are due to the code organisation, we cannot run two instances of the same applet because java use the same memory space and will overwrite the variable.
    Thanks again and in case you want to help me to port the java viewer to java 6.0 you are welcome.
    In case you want to try the flex viewer, you can find it at http://denics.free.fr


  • Mark Patton

    Mark Patton - 2007-10-05

    Logged In: YES
    Originator: YES

    Also ctrlpanel in ViewImage needs to be an instance variable. I did a quick hack to get it working for my project.

    A better solution would be to add support for browsing multiple images in the same applet.
    Since I need to display more than one image at the same time I've avoided the javascript client for now.
    If IIPimage is chosen as a final solution for this project, I will probably spend some time working on the java client.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks