View previous topic :: View next topic |
Author |
Message |
sebfisch n00b
Joined: 10 Mar 2003 Posts: 45 Location: Kiel, Germany
|
Posted: Tue Mar 18, 2003 8:19 pm Post subject: sun-jdk1.4.1 "Could not create system preferences direc |
|
|
hi,
I have a problem similar to the problem described here, but it also accurs with the newly installed version 1.4.1.02.
The use of javax.swing.JFrame in this example class
Code: |
public class Test {
public static void main( String[] args ) {
new javax.swing.JFrame().show();
}
}
|
causes this warning:
Quote: |
18.03.2003 21:17:36 java.util.prefs.FileSystemPreferences$3 run
WARNUNG: Could not create system preferences directory. System preferences are unusable.
|
everythings ok with blackdown jdk..
any idea how to fix this?
thank you,
Sebastian |
|
Back to top |
|
|
Yeric Apprentice
Joined: 17 Feb 2003 Posts: 150
|
Posted: Wed Mar 19, 2003 12:44 am Post subject: |
|
|
maybe a silly question, but have you changed the vm to sun ? this can often cause errors with Java Vm's
do a which java and see which one system is using if it says Blackdown, you need to change your enviroment variables to point to suns Home JDK
hope this helps |
|
Back to top |
|
|
greeneye n00b
Joined: 09 Feb 2003 Posts: 5
|
Posted: Wed Mar 19, 2003 12:58 am Post subject: |
|
|
Hi !
Try to execute the application as root. Only then you have write permissions on the preference directory. After that, the warning should be gone.
greeneye |
|
Back to top |
|
|
sebfisch n00b
Joined: 10 Mar 2003 Posts: 45 Location: Kiel, Germany
|
Posted: Wed Mar 19, 2003 12:49 pm Post subject: thank you! |
|
|
thank you for that tip, I thought of the warning being caused by write permissions but didn't expect that its enough to run the application as root only once and everythings ok
I appreciate your help! Could you also explain the reason for the created directories? The created directories and files are:
Quote: |
/etc/.java/
/etc/.java/.systemPrefs
/etc/.java/.systemPrefs/.systemRootModFile
/etc/.java/.systemPrefs/.system.lock
|
and similar files in the users home directory. But all these files are empty.
I appreciate any help supporting me getting the picture
thank you,
Sebastian
P.S.: Yes Yeric, I changed vm to sun - the warning only occured using sun, blackdown doesn't seem to use such preferences directories (?) |
|
Back to top |
|
|
|