-
Huge VB.Net conversion
I'm in the process of learning Java and struggling converting a VB.Net project that I have been developing for 3 years.
I've had a great response from the forum for previous queries and it's much appreciated.
Can someone point me to the usual Java solution to the Microsoft Registry problem. I've trawled the web and Java seems to have several alternatives. I'd like to go down the most used route on this as I hope that when I have finished this mammoth task it will be truely cross platform.
-
There is none. Java can use the registry (for preferences and the like), but it cannot modify anything that does not either
1. Already belong to it
or
2. It can create under the "java root" entry, or "java user" entry.
And I so "Java user", and not just "user" as I don't believe a Java program even has access to all of that users keys. I could be wrong about that part of it though.
If you want "full" registry access, you are going to need to write a JNI interface.
For the "limited" access that Java provides, see the Preferences class.
-
I want to aviod the registry altogether as I want the converted project to be platform independant. I'm looking for a Java way of holding user settings across program loads. I'll take a look at the Preferences class.
Thanks
-
The Preferences class is the standard user preferences/settings module. On windows, per default, it will store them in the registry, on Unix it will use "dotfiles", what it does on Mac (or others), I don't know.
You, can, however, with some expert work, designate your own storage mechanism for the preferences.