Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Preferences.exportSubTree() does not export all xml nodes  RSS feed

Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code should write information to a preferences file, that is expected to include left, top, width, height, and, title nodes, however, it does not seem to happen. Any idea how to update the code so that preferences are included within the preferences file exported from the File > Export Preferences option?

Source: Core Java Volume I (8th Edition) Listing 10-8 P. 546 to 549

preferences.xml - does not include nodes for left, top, width, height, and, title:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE preferences SYSTEM "">
<preferences EXTERNAL_XML_VERSION="1.0">
<root type="user">
<node name="com">
<node name="horstmann">
<node name="corejava">

"The actual storage of the data is dependent on the platform, e.g. under Windows the Windows Registry is used while under Linux a hidden file in the home directory of the user is used." Quoted from this article.

Does this code snippet save any entries in the Windows registry in my case? Can I look them up?

I am using Win XP SP3.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!