The moose likes JNLP and Web Start and the fly likes problem with setting PreferencesFactory Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Reply Bookmark "problem with setting PreferencesFactory" Watch "problem with setting PreferencesFactory" New topic
Author

problem with setting PreferencesFactory

Aravind Kumar
Ranch Hand

Joined: Nov 03, 2003
Posts: 39
Hello all,

I am trying to use the custom PreferncesFactory webclient version of the front end. I did the following
Added this line at the .jnlp file

<property name="java.util.prefs.PreferencesFactory" value="de.coryx.cps.prefs.PreferencesFactory"/>

But i get the following exception when I use java.util.Preferences pref = Preferences.userRoot():


java.lang.InternalError: Can't instantiate Preferences factory java.lang.ClassNotFoundException: de.coryx.cps.prefs.PreferencesFactory

at java.util.prefs.Preferences.<clinit>(Unknown Source)

at de.coryx.apps.docm.client.swing.Main.<init>(Main.java:116)

at de.coryx.apps.docm.client.swing.Main.main(Main.java:253)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.sun.javaws.Launcher.executeApplication(Unknown Source)

at com.sun.javaws.Launcher.executeMainClass(Unknown Source)

at com.sun.javaws.Launcher.continueLaunch(Unknown Source)

at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)

at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Could security be an issue?? But i have this also in the .jnlp file:

<security>
<all-permissions/>
</security>
....

<property name="java.security.manager" value="true"/>


where am i going wrong?

thanx
Aravind
Aravind Kumar
Ranch Hand

Joined: Nov 03, 2003
Posts: 39
Hello ppl..

I guess, I found out the reason for this...

http://java.sun.com/products/javawebstart/faq.html#54

this says Class.forName doesnt find the resource that are specified in the JNLP file..

But java.util.prefs.Preferences use Class.forName to locate the user defined PreferencesFactory class...

Is this a bug?? or any solution out there?

Aravind
 
IntelliJ Java IDE
 
subject: problem with setting PreferencesFactory
 
Threads others viewed
The field jnlp codebase has an invalid value: $$codebase
unable to find initial contex
JNLP ,JWS Problem Unable to download Jar files(Tocat webserver)
Error during topic setup; - nested throwable:Null or empty subscription
Is It bug in web start?
IntelliJ Java IDE