Results 1 to 7 of 7
  1. #1
    pwlodarczak is offline Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    0

    Default Replace ClassLoader with custom class loader in Java Plugin

    Hi,
    I want to replace the ClassLoader of the Java Plugin with a customized one in IE 6. I tryed to add the

    -Djava.system.class.loader=CustomClassLoader

    in the Java Control Panel but it doesn't seem to load this class loader.
    I tried to put it in the same directory like the applet itself and also localy in the CLASSPATH, but no look.
    There doesn't seem to be any documentation for how to do this.
    Anybody knows how to do this?
    Peter

  2. #2
    gafa's Avatar
    gafa is offline Senior Member
    Join Date
    Jun 2010
    Posts
    107
    Rep Power
    0

    Default

    Do you want to use IE plugin only?

    So you can use the common applet run html code I guess...

    you can read this HTML Applets - HTML Code Tutorial

  3. #3
    pwlodarczak is offline Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    0

    Default

    I got it working by creating a modified sun.applet.AppletClassLoader, put it in a jar and added the jar at the beginning of the boot class path using

    -Xbootclasspath/p:C:/<path>/cl.jar

    in the applet configuration panel. May be this can save someone some time.
    Peter

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    Could you explain where the applet configuration panel is?
    Is it one of the tabs in the Control Panel for java?

  5. #5
    pwlodarczak is offline Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    0

    Default

    Yes, it's the Java control panel, under Java Runtime-Parameter I have

    -Xms256M -Xmx512M -Xbootclasspath/p:C:/<path>/cl.jar

  6. #6
    Horcrux7 is offline Member
    Join Date
    Sep 2010
    Posts
    33
    Rep Power
    0

    Default

    Can you explain why you want change the ClassLoader with a local setting? I know that the classloader from the Appet and Java Web Start are not very good. We have also write our own application classloader.

    But a local setting will interact with all applets that the bowser loads.

  7. #7
    pwlodarczak is offline Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    0

    Default

    Basically we load many applets from different servers. They load the same jars. The customized classloader just makes sure these jars are shared and not loaded more than once. It will not interfere with other applets.

Similar Threads

  1. class loader problems!
    By alacn in forum New To Java
    Replies: 6
    Last Post: 08-11-2010, 10:51 PM
  2. TCCL (Thread context class Loader) ???
    By OutOfMemory in forum Advanced Java
    Replies: 0
    Last Post: 01-07-2010, 12:38 PM
  3. Class loader
    By JavaJunkie in forum New To Java
    Replies: 1
    Last Post: 05-06-2009, 01:17 PM
  4. Replies: 13
    Last Post: 03-16-2009, 09:37 PM
  5. Problem of Classloader in Eclipse Plugin Developemt.
    By Ashish Naidu in forum Eclipse
    Replies: 0
    Last Post: 09-12-2008, 10:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •