Title: ConfiguredUniverse throws an exception when using Java Web Start

Hi,
I get an IllegalArgumentException when I launch my application through java
web start because of a problem in ConfigObject .java getClassForName method.
I don't use this class directly. I use ConfiguredUniverse and give an URL
to the config file.The problem arises when ConfiguredUniverse reads this
config file and try to find the behavior I have specified..
 
In ConfigObject.java there is a method.
protected Class getClassForName(ConfigCommand configcommand, String s){

try{return Class.forName(s, true, ClassLoader.getSystemClassLoader());}

catch(ClassNotFoundException classnotfoundexception){

throw new IllegalArgumentException(errorMessage(configcommand, "Class \"" +
s + "\" not found"));}

}


This mehod fails since is uses ClassLoader.getSystemClassLoader(); Please
se Java web start faq :
http://java.sun.com/products/javawebstart/faq.html#54  :
---------------------------------
faq question:
How can I load resources within my application using Class.forName and
ClassLoader.getSystemClassLoader in JavaTM Web Start?
Answer:
Java Web Start uses a user-level classloader to load all the application
resources specified in the JNLP file. This classloader implements the
security model and the downloading model defined by the JNLP specification.
This is no different than how the AppletViewer or the Java Plug-In works.

This has the, unfortunate, side-effect that Class.forName will not find any
resources that are defined in the JNLP file. The same is true for looking
up resources and classes using the system class loader
(ClassLoader.getSystemClassLoader).

To find application resources in Java Web Start, make sure to use the
classloader that loaded your application, e.g.,:

this.getClass().getClassLoader(), or

Thread.getCurrent().getContextClassLoader() 

---------------------------

ConfigObject should have used this.getClass().getClassLoader(), instead.

Will this be fixed soon? Do you have any workaround suggestions?

Here is the exception:
Settings/eth/.javaws/cache/https/Dwww.2interaction.com/P-
1/DMdownload/DMsoftware/DMsblexplorer/DMnightly/RMavt.jar!/config/j3d1x1-
stereo
(NewViewPlatformBehavior vpb
com.interaction.avt.j3d.behaviors.vp.iaMouseVpBehavior)


 at com.sun.j3d.utils.universe.ConfigObject.getClassForName
(ConfigObject.java:165)

 at
com.sun.j3d.utils.universe.ConfigViewPlatformBehavior.createViewPlatformBeha
vior(ConfigViewPlatformBehavior.java:173)

 at com.sun.j3d.utils.universe.ConfigContainer.processViewPlatformBehaviors
(ConfigContainer.java:671)

 at com.sun.j3d.utils.universe.ConfigContainer.processConfig
(ConfigContainer.java:554)

 at com.sun.j3d.utils.universe.ConfigContainer.<init>
(ConfigContainer.java:120)

 at com.sun.j3d.utils.universe.ConfiguredUniverse.<init>
(ConfiguredUniverse.java:390)

 at com.sun.j3d.utils.universe.ConfiguredUniverse.<init>
(ConfiguredUniverse.java:251)

=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to