openmolecules.org

 
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 1.7.0.65
- centos 6.5 64 Bit with open-jdk 1.7.0.65
- centos 6.5 with oracle-jdk 1.7.0.67
without success.


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

[HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org.openmolecules .datawarrior]
"automatic_update_check"="false"

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">
  </map>

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:   
  org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:377)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:131)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:98)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:702)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:359)
	at java.util.prefs.XmlSupport.writeDoc(XmlSupport.java:276)
	at java.util.prefs.XmlSupport.exportMap(XmlSupport.java:355)
	at java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:622)
	at java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:615)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.util.prefs.FileSystemPreferences.writeBackCache(FileSystemPreferences.java:614)
	at java.util.prefs.FileSystemPreferences.syncSpiPrivileged(FileSystemPreferences.java:801)
	at java.util.prefs.FileSystemPreferences.access$2300(FileSystemPreferences.java:50)
	at java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java:771)
	at java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java:769)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.util.prefs.FileSystemPreferences.syncSpi(FileSystemPreferences.java:768)
	at java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1332)
	at java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1337)
	at java.util.prefs.AbstractPreferences.sync(AbstractPreferences.java:1323)
	at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:747)
	at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
	at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)
	at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50)
	at java.util.prefs.FileSystemPreferences$4$1.run(FileSystemPreferences.java:442)


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 Nov 26 06:59:43 CET 2024

Total time taken to generate the page: 0.03095 seconds