Skip to main content

My feedback on Update 10 and wishlist for the future

42 replies [Last post]
fatbatman
Offline
Joined: 2004-12-24
Points: 0

Here is a list of my thoughts/questions/feedback on Java6u10 that I compiled for a scheduled conference call with Sun that didn't happen. Instead of wasting the notes I thought I'd post them here.

All comments welcome.

1. On the install "Java Setup - Welcome" screen - why is the View Licence Agreement the biggest and most prominent button? The accept button should be. Also the default button (that pressed if I click the enter key) is focused on decline! I would re-work this screen/dialog.

2. Kernal Installer - We really need to be able to specify the set of components that will be downloaded initially if we know they're definitely going to be needed. Otherwise it just means an extra wait for the user when they think it's all finished.

3. The http://www.java.com/en/ page opened when I first opened an applet after installing Java with the Kernal installer!!!! Not nice.

4. It's not clear to the user what is happening when the Java kernal installer is downloading the extra packages. The applet appears to be doing nothing, I think something is displayed in the status bar of the browser or something but it's not obviously to the user.

5. JMC - is really, really important to us we absolutely need good media features for web cams and microphones with a good
This should not require a signed applet to use, but should prompt the user with a standard notification box if the applet attempts to access the webcam etc, when not in a signed applet.

6. Do applets now support transparency like Flash movies can?

7. Browser crashing in old versions must be prevented at all costs.

8. More done to prevent badly behaved applets slowing down a system. We you leave a webpage any processes created as a result of being on that page should be frozen or killed.

9. I had Problems when Internet Explorer and Firefox when both were open during an install.

10. Create a free Java Flash clone for creating simple vector graphics. Will JavaFX have a free Flash editor, with a timeline for making simple animation etc?
(This editor could have auto obfuscation - where compressed code is sent then the actual class files are retrieved when needed to display a StackTrace)

11. Dynamically downloading jars. Dynamically adding jars to the classpath used to require a bit of a hack where by you have a call a method using reflection.

12. 3D is probably very important as Flash doesn't have this. Leverage the casual game developers.

13. Yahoo toolbar. Needs to go.

14. System tray icon. Needs to go.

15. I believe the security permissions have now been relaxed and it's now possible to download an image from a remote server. Is that the case for other types of connections also, HTML, RSS, Streaming media etc. This is important for creating "mashable" applications.

16. For the graphics performance tests (and swing tests), perhaps you should have a standard applet with a set of standard tests that will run then auto-report on and or ask for user feedback based on what they saw.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dkkopp
Offline
Joined: 2003-06-14
Points: 0

Video support will not be part of 6u10. However, according to what I learned at JavaOne, the new Java Media Components will be part of the JavaFX runtime and will also be part of Java 7. The JavaFX preview SDK is due out by the end of July.

I attended the Java Media Components session at JavaOne and was very impressed. I think Sun has finally gotten this figured out.

lowecg
Offline
Joined: 2004-12-20
Points: 0

Can any one tell me if it is possible to seal jars in u10? i.e. if the class isn't in a jar on the class path then don't bother attempting to hit the web server for the .class.

I used to have a lot of performance problems with this when I tried to use some third party components (a certain look and feel and an excel component spring to mind). They internally used reflection to poke around in their code which ended up in a roundtrip to the server before they got the CNF exception. Any latency issues to the web server were then amplified and there was nothing I could do about it.

tackline
Offline
Joined: 2003-06-19
Points: 0

[i]I don't think[/i] that sealing is used to optimise in that way (although sealing packages isn't a bad idea anyway).

I believe, the package element and part attribute detailed in the JNLP specs should do what you want. Disclaimer: I have never tried it.

Checking the bug database I see there are two open bugs associated with it:

"ClassLoader.getResource does not load "lazy" archives properly"
http://bugs.sun.com/view_bug.do?bug_id=6577218 [ 0 votes ]
This is a problem with resources (not classes) having an extension (i.e. a dot) in their name.

"Verify and ensure that lazily downloaded JNLP extensions with AllPermission are lazily downloaded"
http://bugs.sun.com/view_bug.do?bug_id=6674747 [ 0 votes]
So there's no known bugs there, but it doesn't seem to be properly tested either.

lowecg
Offline
Joined: 2004-12-20
Points: 0

Thanks for the reply. I'll take a look at JNLP, but am I right in thinking that this wouldn't apply to applets?

Cheers,

Chris.

tackline
Offline
Joined: 2003-06-19
Points: 0

You can with 6u10!

"The most significant new feature of the next-generation Java Plug-In is built-in support for launching applets from JNLP files. Using the JNLP file format as the applet descriptor allows applets to instantly reuse JNLP extensions previously written for Java Web Start applications, and significantly expands the capabilities of applets in many other ways."
-- https://jdk6.dev.java.net/plugin2/#JNLP

Very groovy.

lowecg
Offline
Joined: 2004-12-20
Points: 0

Very groovy indeed! Thank you for the information tackline - very much appreciated.

Cheers,

Chris.

fatbatman
Offline
Joined: 2004-12-24
Points: 0

Thanks for your answers.

regards

James

qu0ll
Offline
Joined: 2006-12-09
Points: 0

OK I have this working to some extend in that I have created a URL class loader and used it to create a class whose definition lives in a JAR that is not included in the archive parameter of the applet tag but I am getting some access control exceptions when I try to use that class.

First I create the loader as:

[code]
try {
urls[0] = new URL(applet.getCodeBase(), "applet2.jar");
} catch (MalformedURLException murle) {
murle.printStackTrace();
System.exit(1);
}
classLoader = URLClassLoader.newInstance(urls, getClass().getClassLoader());
[/code]

...then I load the class:

[code]
try {
myClass = (MyClass)Class.forName("com.qu0ll.MyClass, true, classLoader).newInstance();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
[/code]

...but when I invoke myClass.doSomething() I get:
}
Exception in thread "Thread-14" java.security.AccessControlException: access denied (java.io.FilePermission C:\Users\Qu0ll\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\12\13bb5ecc-71e014b7.idx read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.RandomAccessFile.(Unknown Source)
at com.sun.deploy.util.SyncFileAccess.openLockFileObject(Unknown Source)
at com.sun.deploy.util.SyncFileAccess.openLockRandomAccessFile(Unknown Source)
at com.sun.deploy.cache.CacheEntry.openLockIndexFile(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
at com.sun.deploy.cache.CacheEntry.getManifest(Unknown Source)
at com.sun.deploy.cache.CachedJarFile.getManifest(Unknown Source)
at sun.misc.URLClassPath$JarLoader$2.getManifest(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.qu0ll.MyClassImpl.a(MyClassImpl.java:44)
at Builder.run(Builder.java:481)
at java.lang.Thread.run(Unknown Source)

So, what am I doing wrong?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> ...but when I invoke myClass.doSomething() I get:
> }
> Exception in thread "Thread-14"
> java.security.AccessControlException: access denied
> (java.io.FilePermission
> C:\Users\Qu0ll\AppData\LocalLow\Sun\Java\Deployment\ca
> che\6.0\12\13bb5ecc-71e014b7.idx read)

At the very least this looks like a confusing error message that needs to get fixed. By the looks of it Java let you get further than you should have gotten before getting an error message (if indeed you did anything wrong) and the message itself contains irrelevant technical details that don't help you solve the problem.

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Yes, well it's certainly no help to me :-)

But can you see anything that I am doing that I shouldn't be doing?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

qu0ll
Offline
Joined: 2006-12-09
Points: 0

> Yes, well it's certainly no help to me

BTW, I am referring to the error message, not you here :-)

> But can you see anything that I am doing that I shouldn't be doing?

Other than omitting a closing " in the slightly edited code.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> But can you see anything that I am doing that I
> shouldn't be doing?

My guess, and this is completely a guess, is that the URLClassLoader implementation forgets to dynamically add you permission to access the underlying files associated with "com.qu0ll.MyClass". What I mean is this... when you download static dependencies the ClassLoader is probably smart enough to give you read access to their index/cache files on disk. It probably forgets to give you read permissions to newly-created index files as you download new class files.

In short, it sounds like a JDK bug to me. The fact that the exception message reveals low-level filenames (.idx) is a big indicator to me.

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Yes, I agree cowwoc that it looks like a bug. And it's a show stopper for us as we absolutely need to load some classes dynamically owing to the size of the JAR in which they reside.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

tackline
Offline
Joined: 2003-06-19
Points: 0

Oops. Looks like a bug in the deployment jar URL handler (WebStart/PlugIn replaces the default handler in order to support a cache). I shall look into it...

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Thanks tackline - much appreciated.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

kbr
Offline
Joined: 2003-06-16
Points: 0

FYI, I've filed 6724337 to track this issue. It should show up in the Sun Bug Database in a few days.

ngthomas
Offline
Joined: 2004-06-03
Points: 0

I tried to reproduce the bug, but cannot yet so far. Below is my testcase source code.

It consist of three simple class. Entry point Hello World, which simply create an instance of class Test, and invoke test.start().

test.start() basically creates the custom URLClassLoader, and then invoke the methods in MyTest.

If I call the methods in MyTest directly, it always fail with ClassNotFound exception, because PluginClassLoader cannot find the MyTest class. I tried with Java 5 old plugin, same results.

However, if I uses reflection to call into MyTest, everything works.

Either way, I cannot reproduce the exception that is reported.

Can you please provide a simple testcase with all the source code so I can reproduce the bug and investigate further ?

thanks,
thomas

public class HelloWorld extends Applet implements ActionListener {
JButton b1;

public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);

}

public void actionPerformed(ActionEvent e) {

}

public void init() {
System.out.println("Hello World 6724337!");

test t = new test(getCodeBase());

t.start();

System.out.println("init finished OK");
}
public void stop() {
System.out.println("HelloWorld stop()");
}
public void destroy() {
System.out.println("HelloWorld destroy()");
}
protected void finalize() throws Throwable {
System.out.println("HelloWorld finalize()");
}
}

import java.lang.reflect.*;
import java.net.*;

public class test extends Thread {

URL codebase;

public test(URL u) {
System.out.println("test ctor");
codebase = u;

System.out.println("context class loader: " + Thread.currentThread().get
ContextClassLoader());
}

public void run() {
System.out.println("test.run!");

System.out.println("context class loader: " + Thread.currentThread().get
ContextClassLoader());
URL[] urls = new URL[1];
try {
urls[0] = new URL(codebase, "applet2.jar");
System.out.println("urls 0: " + urls[0]);
} catch (MalformedURLException mue) {
mue.printStackTrace();
return;
}
ClassLoader classLoader = URLClassLoader.newInstance(urls, this.getClass
().getClassLoader());

try {
Class c = Class.forName("foo.MyClass", true, classLoader);
System.out.println("c: " + c);
System.out.println("c.getClassLoader: " + c.getClassLoader());

Class partypes[] = new Class[1];
partypes[0] = Integer.TYPE;
Constructor ct = c.getConstructor(partypes);
Method meth = c.getMethod("printArg", partypes);
Object arglist[] = new Object[1];
arglist[0] = new Integer(1);

// call static method printArg
meth.invoke(null, arglist);

Object retObject = ct.newInstance(arglist);

// call instance method doSomething
meth = c.getMethod("doSomething", null);

meth.invoke(retObject, null);

} catch (Exception e) {
e.printStackTrace();
return;
}

}
}

public class MyClass {

public MyClass() {
System.out.println("MyClass()");
Thread.dumpStack();
}

public MyClass(int i) {
System.out.println("MyClass(int)");
Thread.dumpStack();
}

public void doSomething() {
System.out.println("MyClass.doSomething()");
}
public static void printArg(int i) {
System.out.println("printArg: " + i);
}
}

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Are you saying that I need to use reflection to invoke the methods or it won't work? I don't get any ClassNotFoundException when I access the methods directly.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

ngthomas
Offline
Joined: 2004-06-03
Points: 0

Yes, that's the behaviour that I am seeing. I cannot reproduce the AccessControlPermission that you are seeing.

Can you please provide source code to your testcase so I can reproduce your problem and investigate further ?

-thomas

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Hi Thomas,

Since moving from b25 to b27 I cannot seem to reproduce this problem anymore. Anyway, there's no need to use reflection - you can just code against an interface (which is not dynamically loaded) and then you can access all the methods of the dynamcially loaded classes directly.

But there is one thing that is clear about dynamically loading JARs... class instantiation is S-L-O-W! I have found that once the first class is downloaded, each subsequent instantiation of a class from within that same dynamically loaded JAR takes forever. It's as if the JAR is not being downloaded in full but that each class is downloaded separately and thus incurring the overhead of an additional IO.

Is this possible? I am finding that the exact same sequence of code (which includes many instantiations of classes loaded from within the dynamically loaded JAR) is running up to 30-40 times slower than if I load the JAR explicitly. This negates the advantages of dynamically loading the JAR in the first place :-(

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

fatbatman
Offline
Joined: 2004-12-24
Points: 0

Yes we experienced this, specifically very, very slow loading of images files within the dynamically loaded jar, but with hindsight I suppose it was probably that the code was running very slowly and maybe nothing specfic to finding the images on the classpath, or maybe it was both.
About 30-40 times slower sounds about right, it was unusable.

qu0ll
Offline
Joined: 2006-12-09
Points: 0

But why would the code be running slowly? I am comparing the exact same code running from within the dynamically loaded JAR and also when running from a statically downloaded JAR and the only difference I can see is that each class is being downloaded as it is instantiated when using the dynamically loaded JAR.

So perhaps loading a JAR dynamically is quite different from a static load in that perhaps each class is loaded separately. I cannot see any other reason why the code runs so much slower (maybe up to 50 times slower) when run from within a dynamically loaded JAR.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

ngthomas
Offline
Joined: 2004-06-03
Points: 0

Can you please provide a testcase that shows the slowness problem with dynamically loaded JAR ?

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Hmm, but any attempt I have made in the past to create a class loader in an applet has failed with security exceptions because I thought they were not permitted.

What's the secret in getting them to work?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

tackline
Offline
Joined: 2003-06-19
Points: 0

Use java.net.URLClassLoader.newInstance instead of trying to extend or directly construct a class loader. URLClassLoader.newInstance returns an instance that is safe and of a class that you cannot extend.

qu0ll
Offline
Joined: 2006-12-09
Points: 0

OK great, thanks.

So if I ask this new class loader to load a class then the entire JAR in which it resides is downloaded? If this is the case then how is this any different from what I am doing now which is programming against an interface in the applet and then loading the dynamically required classes with Class.forName()? Maybe they are the same? Perhaps using the class loader would be faster (hoping)?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

kbr
Offline
Joined: 2003-06-16
Points: 0

> Actually, i have the new plugin crashing Firefox 3 on
> the daily basis. So much for the advertised
> robustness. On the other hand, i have avoided sites
> with applets like plague in pre-Firefox 3 days, so
> this might be an improvement...

If you ever experience a browser crash with the new Java Plug-In, please provide the URL of the site causing the crash. Otherwise we can not act upon the report. We consider browser crashes unacceptable. I personally have not experienced an applet-related browser crash in months. Overall user feedback confirms that the new plug-in is significantly more robust than previous versions.

xlinuks
Offline
Joined: 2006-05-09
Points: 0

Hi, nice thread,
what I learned from this thread is that while Sun's PR agents claimed update 10 it will be a major version that will wipe all Java showstoppers - it's developers realize that it just cannot happen.

I also couldn't find any info on the video/codecs API, how to use them, we (the app developers) need documentation on that. This is the major feature I expect and care about. Perhaps video support has been dropped on the sly for another release?

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> I also couldn't find any info on the video/codecs
> API, how to use them, we (the app developers) need
> documentation on that. This is the major feature I
> expect and care about. Perhaps video support has been
> dropped on the sly for another release?

I think you are mistaken, Sun never tried the video codecs to update 10. If anything, I believe it was related to JavaFX.

xlinuks
Offline
Joined: 2006-05-09
Points: 0

Thanks for pointing that out, across JavaOne 2008 they kept saying that update 10 will bring such and such features and that Sun will make sure the update process with push the updated JRE to all users so Java can eventually take over Flash. Looks like not since they won't have video support - Flash is used even on Sun's sites quite often for a single reason - because Flash supports video, does that mean that JavaFX (or video support for that matter) will not be included into the update 10? - the user will have to download and install a different peace of software to be able to watch video?

cowwoc
Offline
Joined: 2003-08-24
Points: 0

I don't expect Sun to introduce new features before Java7 seeing as they can't add new APIs into Java6.

I don't work for Sun though so I have no way of knowing for sure.

xlinuks
Offline
Joined: 2006-05-09
Points: 0

Well thank you anyway.

kbr
Offline
Joined: 2003-06-16
Points: 0

I can only provide authoritative answers on the applet-related questions:

> 6. Do applets now support transparency like Flash
> movies can?

Sorry, we did not have time to implement this in 6u10. It is however being tracked under 6646289 for a future release.

> 7. Browser crashing in old versions must be prevented
> at all costs.

The new Java Plug-In in 6u10 should be substantially more robust than earlier releases. The path toward better applet robustness is broad deployment of 6u10.

> 8. More done to prevent badly behaved applets slowing
> down a system. We you leave a webpage any processes
> created as a result of being on that page should be
> frozen or killed.

There are already safeguards in the new Java Plug-In in this area. Poorly behaved applets are shut down "hard".

> 9. I had Problems when Internet Explorer and Firefox
> when both were open during an install.

The 6u10 installer should handle this case better. If you are seeing problems with the 6u10 installer, please file a bug.

> 11. Dynamically downloading jars. Dynamically adding
> jars to the classpath used to require a bit of a hack
> where by you have a call a method using reflection.

Based on the discussion above it looks like there is a bug, possibly a recent regression, in this area. Some other engineers from the deployment team will follow up.

> 12. 3D is probably very important as Flash doesn't
> have this. Leverage the casual game developers.

http://jogl.dev.java.net/ , http://jogl-demos.dev.java.net/ , and http://jdk6.dev.java.net/plugin2/ provide several examples of 3D applets and applications whose development and portable deployment are enabled by Java.

> 14. System tray icon. Needs to go.

There is no time to investigate another technical alternative for this in 6u10. It is the only way to access the Java Console on the fly for the multiple JVMs launched by the new Java Plug-In. We plan additional work in this area in subsequent update releases.

> 15. I believe the security permissions have now been
> relaxed and it's now possible to download an image
> from a remote server. Is that the case for other
> types of connections also, HTML, RSS, Streaming media
> etc. This is important for creating "mashable"
> applications.

Yes. Documentation is currently lacking on Java's new support for crossdomain.xml files, although there is an example on http://weblogs.java.net/blog/joshy/archive/2008/05/java_doodle_cro.html . This functionality is very new and might require some iteration in update releases. Please try it and provide your feedback.

cowwoc
Offline
Joined: 2003-08-24
Points: 0

> There are already safeguards in the new Java Plug-In
> in this area. Poorly behaved applets are shut down
> "hard".

Caer to elaborate?

qu0ll
Offline
Joined: 2006-12-09
Points: 0

Excellent comments. I would add the following:

> 2. Kernal Installer - We really need to be able to specify the set of
> componentsthat will be downloaded initially if we know they're definitely going
> to be needed. Otherwise it just means an extra wait for the user when they
> think it's all finished.

I couldn't agree more with this. What is considered "kernel" to one application may not be considered kernel to another. For example, we don't use Swing at all in our applets so we don't consider Swing to be part of our kernel requirements. Obviously this is not the case for all applets.

> 5. JMC - is really, really important to us we absolutely need good media
> features for web cams and microphones with a good
> This should not require a signed applet to use, but should prompt the user
> with a standard notification box if the applet attempts to access the webcam
> etc, when not in a signed applet.

I totally agree again. Just how far off is JMC anyway? Will it allow media player components to be lightweight and embeddable in AWT or Swing components?

> 11. Dynamically downloading jars. Dynamically adding jars to the
> classpath used to require a bit of a hack where by you have a call a method
> using reflection.

You say "used to require a bit of a hack" but it still does doesn't it? I mean dynamic loading of JARs is not possible is it?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

fatbatman
Offline
Joined: 2004-12-24
Points: 0

>> 11. Dynamically downloading jars. Dynamically adding jars to the
>> classpath used to require a bit of a hack where by you have a call a method
>> using reflection.

>You say "used to require a bit of a hack" but it still does doesn't it? I mean dynamic >loading of JARs is not possible is it?

Sorry it was meant to be asked as a question on a conference call.

It is possible currently with a signed applet but you need to get the classpath which will be a string, append the new Jar to it, then set this back using reflection because the method is private, something like that anyway. I meant to ask Sun if this would be easier in the future.

tackline
Offline
Joined: 2003-06-19
Points: 0

> >> 11. Dynamically downloading jars. Dynamically
> adding jars to the
> >> classpath used to require a bit of a hack where by
> you have a call a method
> >> using reflection.
>
> >You say "used to require a bit of a hack" but it
> still does doesn't it? I mean dynamic >loading of
> JARs is not possible is it?

> It is possible currently with a signed applet but you
> need to get the classpath which will be a string,
> append the new Jar to it, then set this back using
> reflection because the method is private, something
> like that anyway. I meant to ask Sun if this would
> be easier in the future.

Dynamic loading of jars in unsigned applets is supported.

Dynamically adding to the classpath is not. Adding to any class loader after construction would be a hack. Do you actually mean the classpath (sytem class loader), or do you mean to the applet class loader?

To dynamically load a jar create a ClassLoader with java.net.URLClassLoader.newInstance. Use the class loader of your existing class as the parent (getClass().getClassLoader()). Because it is a child class loader, the dynamically loaded jar will be able to link to the applet classes, but in the other direction reflection is needed (so provide appropriate interfaces in the applet).

fatbatman
Offline
Joined: 2004-12-24
Points: 0

Thanks for the clarification. It was some time ago when I did this and I couldn't find the code when I checked earlier.

kirillcool
Offline
Joined: 2004-11-17
Points: 0

> 7. Browser crashing in old versions must be prevented
> at all costs.

Actually, i have the new plugin crashing Firefox 3 on the daily basis. So much for the advertised robustness. On the other hand, i have avoided sites with applets like plague in pre-Firefox 3 days, so this might be an improvement...

trembovetski
Offline
Joined: 2003-12-31
Points: 0

Please do file bugs if you haven't.

Dmitri

kirillcool
Offline
Joined: 2004-11-17
Points: 0

> Please do file bugs if you haven't.

Dmitri,

When FF3 + 6u10 crash on a site with applet, i don't really have anything substantial to report. FF3 doesn't give me an option to create an automatic report and send it to some bug tracker (either FF itself or Sun's), and Java plugin is not "smart" enough to realize that it has crashed the last time and collect that data. All i know is that it crashes more than the old combination (FF2 + older Javas) and still takes the whole browser with it when it does.

Kirill

trembovetski
Offline
Joined: 2003-12-31
Points: 0

I think if you just specify the pages which crash the browser, along with your specific browser and system configurations, it would be a good start for plugin developers.

Dmitri