This discussion is archived
1 Reply Latest reply: Sep 21, 2010 11:35 PM by 800773 RSS

Save and load variables in java

843804 Newbie
Currently Being Moderated
Hi ,
I need a help about Save and load .

I have a project(tool) which have JText, JRadioButton and other things also.

I want to save all the changes for the next execution ( fresh startup or fresh bring up of the tool).

Please let me know what will be the better way to save and load.

can i get below use of C# in Java similar way ( below one is the C# code)
 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
        
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
        
        public static Settings Default {
            get {
                return defaultInstance;
            }
        }
        
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("PATH")]
        public string SourceDirectory {
            get {
                return ((string)(this["SourceDirectory"]));
            }
            set {
                this["SourceDirectory"] = value;
            }
        }
---
}
Can i do Strore and load without any File storage?


Thanks in advance