Bug#268214: [PATCH] create /etc/.java to fix it.
Alex Owen
Alex Owen <owen@cus.org.uk>, 268214@bugs.debian.org
Tue Oct 5 15:29:04 2004
tags 268214 patch
thanks
Hi,
I think I have the solution!
Look in java/util/prefs/FileSystemPreferences.java
from /usr/lib/j2sdk1.4-sun/src.zip.
Lines 153--162 are the important ones.
Basically the code takes the property java.util.prefs.systemRoot as
the dir in which .systemPrefs shoudl exist. If java.util.prefs.systemRoot
is not set (and it is unset by default) then take /etc/.java as the dir
in which .systemPrefs should exist. If that fails if falls back to using
java.home (ie /usr/lib/j2sdk1.4-sun/jre/).
It seems we need to create a dir /etc/.java/.systemPrefs/
So in summary it looks like the JVM is trying to do the right thing BUT we
need to provide it the correct directory in which to do it.
Here is a patch to do just that.
---8<---
--- lib/j2se.sh.orig 2004-09-13 07:53:22.000000000 +0100
+++ lib/j2se.sh 2004-10-05 21:57:54.000000000 +0100
@@ -132,6 +132,8 @@
# Problem: dh_installchangelogs thinks this is a native package.
echo " dh_installdocs"
dh_installdocs
+ echo " dh_installdirs"
+ dh_installdirs etc/.java/.systemPrefs
# dh_install
# dh_link
echo " dh_strip"
---8<---
Bye for now...
Alex Owen