Home » DataWarrior » Bug Reports » Saving Preferences in Linux (Saving Preferences in Linux is not working)
Saving Preferences in Linux [message #6] Mon, 08 September 2014 15:19
BuildOnC is currently offline  BuildOnC
Messages: 2
Registered: September 2014
Location: Germany
Junior Member
Hello there,
at first, thanks a lot for this beautiful software Smile

However - there is a problem in Linux.

Say, I want to disable the "Automatically Check For Updates" function (help menue).
It doesn't get stored in Linux.
I've tried
- fedora 20 64Bit with open-jdk
- centos 6.5 64 Bit with open-jdk
- centos 6.5 with oracle-jdk
without success.

In Windows this setting is stored within the registry --> here:

[HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org.openmolecules .datawarrior]

Within Linux it shoud save something underneath "~/.java/.userPrefs/..." but this goes way wrong.

This is, what I found out so far:

User Prefs in Linux are stored in this path (seriously!):
~/.java/.userPrefs/_!'8!cg"n!#4!bw"w!'`!bg"t!'8!b!"l!':!d@ "s!'`!cw!u!'@!}@"0!'%!dw"h!()!cg"p!'8!cg==

However this doesnt really work (maybe already because of the defective path name)
- instead a 0 Bytes "prefs.tmp" is written (but at least underneath that strange path - so that path is recognised somehow)

This "prefs.tmp" is going to be deleted and recreated again at every start.

The programm really tries hard to look for "prefs.xml" (same path) - says strace - but it doesn't find it.
If I create "prefs.xml" like this (I can't use URLs because of posting policies)...

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <!DOCTYPE map SYSTEM "httx java . sun . com / dtd / preferences . dtd">
  <map MAP_XML_VERSION="1.0">

nothing gets written to it anyway (a prefs.xml which is not XML conform will be renamed to "IncorrectFormatPrefs.xml)

Besides, java crashes on exit like this:
  Exception in thread "Thread-2" java.lang.AbstractMethodError:   
	at java.util.prefs.XmlSupport.writeDoc(
	at java.util.prefs.XmlSupport.exportMap(
	at java.util.prefs.FileSystemPreferences$
	at java.util.prefs.FileSystemPreferences$
	at Method)
	at java.util.prefs.FileSystemPreferences.writeBackCache(
	at java.util.prefs.FileSystemPreferences.syncSpiPrivileged(
	at java.util.prefs.FileSystemPreferences.access$2300(
	at java.util.prefs.FileSystemPreferences$
	at java.util.prefs.FileSystemPreferences$
	at Method)
	at java.util.prefs.FileSystemPreferences.syncSpi(
	at java.util.prefs.AbstractPreferences.sync2(
	at java.util.prefs.AbstractPreferences.sync2(
	at java.util.prefs.AbstractPreferences.sync(
	at java.util.prefs.FileSystemPreferences.sync(
	at java.util.prefs.FileSystemPreferences.flush(
	at java.util.prefs.FileSystemPreferences.syncWorld(
	at java.util.prefs.FileSystemPreferences.access$1200(
	at java.util.prefs.FileSystemPreferences$4$

This looks more or less exactly like the problem which is mentioned (and solved!) here (I have to make it a "non link" because of posting policies, sorry):
- sourceforge . net / p / jppf-project / bugs / 9 /

Finally, the question is:
Is there some workaround possible (like throwing some parameters like -Dsomething.something=something at this?) ?

Thanks a lot,
the guy build on C Wink

Next Topic: Saving Preferences in Linux - Solution
Goto Forum:

Current Time: Tue Jan 23 12:47:13 CET 2018

Total time taken to generate the page: 0.00339 seconds